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

How to lower hit's score/position if specific field is empty? #1895

Open
aine-etke opened this issue Oct 28, 2023 · 2 comments
Open

How to lower hit's score/position if specific field is empty? #1895

aine-etke opened this issue Oct 28, 2023 · 2 comments

Comments

@aine-etke
Copy link

Hello,

Is there a way to lower hit's score when a specific field is empty?
Boosting won't help here, because that specific field is not searchable, but it is returned as part of the search results

@abhinavdangeti
Copy link
Member

@etkecc Boosting the subquery is the way to go about this. Would you share your exact query so we can get a better idea at what you're attempting.

@aine-etke
Copy link
Author

Not sure how to boost empty field

Here is query builder: https://gitlab.com/etke.cc/mrs/api/-/blob/main/services/search.go?ref_type=heads#L183

Here is index mapping: https://gitlab.com/etke.cc/mrs/api/-/blob/main/repository/search/bleve.go?ref_type=heads#L57

Here is model used for index: https://gitlab.com/etke.cc/mrs/api/-/blob/main/model/search.go?ref_type=heads#L4

Example query (ui): https://matrixrooms.info/search/?q=Matrix%20Hosting

The question is: how to lower score of an Entry where Alias is empty

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

No branches or pull requests

2 participants