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
Weird search result (aka no result) - but the gem exists #1662
Comments
Interestingly, this query finds term-ansicolor using as query term-ansi: https://rubygems.org/search?utf8=%E2%9C%93&query=term-ansi Whereas if you chop off one character at the end, using as query term-ans: https://rubygems.org/search?utf8=%E2%9C%93&query=term-ans It says no gem is found. Can it be that there is some code that checks in an awkward manner based on the amount of input character or some possible query, which then may lead to some wrong result? |
Looking at the source code, the search functionality uses ElasticSearch: rubygems.org/app/models/concerns/rubygem_searchable.rb Lines 52 to 62 in 421e841
So it's either a problem with the elastic search query constructed in |
Thanks for reporting this, yes this search should be listing the term-ansicolor gem in the results |
This is related to how elasticsearch indexes the gem names. There's a spectrum of too little to too much but I'm sure we can tweak it a bit. |
@dwradcliffe : If nobody is working on this I would like to start working on this. |
sure 👍 have at it. |
Okay, thanks for the heads up @sonalkr132 . |
Is this to be expected?
Search URL:
https://rubygems.org/search?utf8=%E2%9C%93&query=term-ans
That is, search for "term-ans".
No result turns up.
The gem I was looking for does exist though:
https://rubygems.org/gems/term-ansicolor
I would have assumed that a sub-string would match.
Is the above expected behaviour or is it a bug?
The text was updated successfully, but these errors were encountered: