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

Search engine does not find documentation for functions like where, from, and, or. #996

Closed
sztosz opened this issue Apr 10, 2019 · 5 comments

Comments

@sztosz
Copy link

sztosz commented Apr 10, 2019

Current behaviour

https://hexdocs.pm/ecto/search.html?q=where gives no results "Sorry, we couldn't find anything for with.

https://hexdocs.pm/ecto/search.html?q=from gives no results "Sorry, we couldn't find anything for with.

https://hexdocs.pm/ecto/search.html?q=or gives no results "Sorry, we couldn't find anything for with.

https://hexdocs.pm/ecto/search.html?q=and finds only one result: https://hexdocs.pm/ecto/Ecto.Query.html#or_where/3

Expected behaviour

https://hexdocs.pm/ecto/search.html?q=where should find at least this page: https://hexdocs.pm/ecto/Ecto.Query.html#where/3

https://hexdocs.pm/ecto/search.html?q=or should find at least this page: https://hexdocs.pm/ecto/Ecto.Query.API.html#or/2

https://hexdocs.pm/ecto/search.html?q=and should also find this page: https://hexdocs.pm/ecto/Ecto.Query.API.html#and/2

https://hexdocs.pm/ecto/search.html?q=from should find at least this page: https://hexdocs.pm/ecto/Ecto.Query.html#from/2

@sztosz
Copy link
Author

sztosz commented Apr 10, 2019

I believe, looking superficially at different results when using keywords, that it's probably solvable by making sure that all the strings entered into the search input are treated always as strings and never as keywords with special cases for *, ^, etc.

@josevalim
Copy link
Member

It may be that we can't fix it in all cases. Words like and and or are usually removed from full text search engines because they are considered stop words. We could remove the stop words and keep and and or but they will likely appear on every result.

Maybe a course of action is to add a new entry to the search suggestions that say "If you are looking for a particular module or function, use the autocompletion feature in the sidebar search, instead of full-text search."

@sztosz
Copy link
Author

sztosz commented Apr 10, 2019

If autocompletion works for and and or, maybe simple solution would be to add those results that we can take from autocompletion to the full-text results?

For me personally, previous search results, I assume they were without full-text search, were better than what I get now. They were more accurate, and had the results I expected and needed. But it's my personal point of view, and I don't expect majority sharing it.

@josevalim
Copy link
Member

For me personally, previous search results, I assume they were without full-text search, were better than what I get now.

They were not full text search. They were exactly what the autocomplete is now and today you can get those results without having to go to the search page.

@josevalim
Copy link
Member

Maybe we should remove stop words and increase the weight of the title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants