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

Enhance boolean search expression. #226

Merged
merged 2 commits into from
Nov 12, 2020

Conversation

ViliusS
Copy link
Contributor

@ViliusS ViliusS commented Oct 26, 2020

This patch changes two things:

  1. When using custom Tokenizer, enables searching for UUIDs, product names and other items with dashes in their names by counting only space and dash character as an expression instead of just dash (see:
    Searching with dash results in errors #161, Boolean search for uuid results in PHP errors #215, Exception when using boolean search type with inputs that contain two hyphens in one word trilbymedia/grav-plugin-tntsearch#92)
  2. In some sense it partially reverts 33cc524 as email address parts are broken into tokens in the default Tokenizer anyway.

P.S. Negative boolean search is still completely broken. It errors out on more than one negative expression ('searchstring -test -test2') and it returns incorrect results with one negative expression ('searchstring -test'). I will try to investigate this further.

This patch changes two things:
1) When using custom Tokenizer, enables searching for UUIDs, product names and other items with dashes in their names by counting only space and dash character as an expression instead of just dash (see:
teamtnt#161, teamtnt#215, trilbymedia/grav-plugin-tntsearch#92)
2) In some sense it partialy reverts teamtnt@33cc524 as email address parts are broken into tokens in the default Tokenizer anyway.
@ViliusS
Copy link
Contributor Author

ViliusS commented Nov 4, 2020

Did anyone had time to look into this?

@nticaric
Copy link
Contributor

nticaric commented Nov 4, 2020

Thanks for the PR. Didn't have time to look into this yet, will try to do it today.

@nticaric nticaric merged commit 5684986 into teamtnt:master Nov 12, 2020
@ViliusS ViliusS deleted the enhance-boolean-search branch February 17, 2021 16:17
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.

2 participants