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

Update search-ui.js : typo in query config #175

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Conversation

awoods
Copy link
Contributor

@awoods awoods commented Nov 16, 2023

The intent of the code is to perform an AND query with the terms provided in the search. However, there is a typo in the search fields configuration that results in the default OR behavior. We should be using bool: "AND" instead of 'boolean: "AND"'.

See: https://github.com/weixsong/elasticlunr.js#522-boolean-model

To test on the demo site:

  • a search with "portrait" returns 3 results.
  • a search with "portrait Majnun" currently returns 4 results (OR behavior)
  • the search should return 1 result (AND behavior)

The intent of the code is to perform an `AND` query with the terms provided in the search. However, there is a typo in the search fields configuration that results in the default `OR` behavior. We should be using `bool: "AND"` instead of 'boolean: "AND"'.

See: https://github.com/weixsong/elasticlunr.js#522-boolean-model

To test on the [demo site](https://minicomp.github.io/wax/search/), a search with "portrait" returns 3 results.
* a search with "portrait Majnun" currently returns 4 results (`OR` behavior)
* the search should return 1 result (`AND` behavior)
@mnyrop
Copy link
Member

mnyrop commented Nov 27, 2023

thanks @awoods!

@mnyrop mnyrop merged commit e9a3993 into minicomp:main Nov 27, 2023
1 check passed
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