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

rework ranking queries #168

Merged
merged 6 commits into from Aug 29, 2020
Merged

rework ranking queries #168

merged 6 commits into from Aug 29, 2020

Conversation

garbas
Copy link
Member

@garbas garbas commented Aug 28, 2020

fixes #156


This change is Reviewable

@garbas garbas requested a review from samueldr August 28, 2020 20:05
@github-actions
Copy link
Contributor

@samueldr
Copy link
Member

It looks like it may be filtering results way better, for some of the queries. css minifier decreases from 559 to 192 results.

Though, at the same time, there are still high ranking results that I doubt should be present. Right after the perl-based CSS minifier results, there are JavaScript minifiers, nothing matching CSS AFAICT.

I don't understand what the implementation changes here are, considering my lack of expertise with Elasticsearch. So I can't say for sure whether this is going in the right direction, though observing the effects it seems it does.

Is it possible to see why a result was matched in the result? Is this what matched_queries represent? And then it's ranked (only?) by the amount of matched queries? I see it goes from 20 for the first two, while going to 9 from then on. I can see the same names under should in the query.

@garbas
Copy link
Member Author

garbas commented Aug 29, 2020

It looks like it may be filtering results way better, for some of the queries. css minifier decreases from 559 to 192 results.

Though, at the same time, there are still high ranking results that I doubt should be present. Right after the perl-based CSS minifier results, there are JavaScript minifiers, nothing matching CSS AFAICT.

* https://5f49651ee28abe00aa84b74a--nixos-search.netlify.app/packages?show=perl528Packages.JavaScriptMinifierXS&query=css%20minifier&from=0&size=15&sort=relevance&channel=unstable

I don't understand what the implementation changes here are, considering my lack of expertise with Elasticsearch. So I can't say for sure whether this is going in the right direction, though observing the effects it seems it does.

I'm thinking of merging this since it immediately improves things, but trying to rethink and improve further.

Is it possible to see why a result was matched in the result? Is this what matched_queries represent? And then it's ranked (only?) by the amount of matched queries? I see it goes from 20 for the first two, while going to 9 from then on. I can see the same names under should in the query.

in both Packages.elm and Options.elm you can look for -- DEBUG: and if you comment out those lines it will print which queries are matched. Also the matching score is then displayed for each result. This is what I usually uncomment when I'm working on figuring out the relevancy.

But you don't have to worry with Elm, you just need to type JSON as described in https://www.elastic.co/guide/en/elasticsearch/reference/7.2/query-dsl.html . then you simply issue a curl request.

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@garbas garbas merged commit b4a6535 into master Aug 29, 2020
@garbas garbas deleted the fix-156 branch August 29, 2020 23:03
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.

Search seems to be OR-based now reducing relevancy for multiple terms
2 participants