Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proximity search #477

Merged
merged 10 commits into from
Oct 22, 2024
Merged

Add proximity search #477

merged 10 commits into from
Oct 22, 2024

Conversation

tcouch
Copy link
Collaborator

@tcouch tcouch commented Sep 25, 2024

closes #299

As described in the issue, this introduces the ability to carry out a proximity search where a search string like:

Tarquinium ~5 ferens

Would match:

Tarquinium Superbum regem adiit nouem libros ferens

In the example above ~5 represents exactly five intervening words. You can also specify upper and lower bounds for the number of intervening words:

  • Tarquinium ~:5 libros matches because :5 means up to five words
  • Tarquinium ~3:5 libros matches because 3:5 means between three and five words, but Tarquinium ~3:5 adiit would not match because there are only 2 intervening words

@tcouch tcouch marked this pull request as ready for review October 4, 2024 18:28
@tcouch tcouch requested a review from acholyn October 4, 2024 18:29
@acholyn
Copy link
Collaborator

acholyn commented Oct 7, 2024

Seems to work for whole words nicely. The issue mentions also working with incomplete words eg Marc ~1 varro should still return Marcus Varro but it doesn't return anything currently

@acholyn
Copy link
Collaborator

acholyn commented Oct 10, 2024

Would be good to update the helptext to reflect that the ambiguity is possible but you need to add the wildcard character (I didn't realise this)

@tcouch
Copy link
Collaborator Author

tcouch commented Oct 14, 2024

@acholyn I've updated the help text as well as fixing another issue which was stopping search snippets from working. Do you want to have another look before I merge?

@tcouch tcouch merged commit b1b62be into development Oct 22, 2024
5 checks passed
@tcouch tcouch deleted the feature/299-proximity-search branch October 22, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proximity search with tilde character
2 participants