git / git-scm.com

The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.
https://git-scm.com/
MIT License
2.16k stars 1.22k forks source link

search covers only dynamic content #1109

Open peff opened 6 years ago

peff commented 6 years ago

We index the book and manpage content for the search feature, but not any of the static content. So searching for "trademark", for example, will not turn up the trademark page (nor will "downoad" find the download page, etc).

We probably could feed the static pages into the index, but I'm not sure of the details.

pedrorijo91 commented 6 years ago

There are a few search related topics from a deprecated TODO file that should be considered when addressing this issue (https://github.com/git/git-scm.com/blob/2c4281d6bfd1fab54cf6f1c8a47318f3c49607f1/TODO.txt) :

Probably a few can be discarded (adding stackoverflow to search seems an overkill for instance), but let's reflect on them when implementing

cornel001 commented 5 years ago

Hi. What does the search in the upper right of the site? It always returns Sorry, no search matches no matter the browser used and what I search. It is a bug ? Thanks.

pedrorijo91 commented 5 years ago

thanks for reporting @cornel001 , it seems like a bug.

@peff I have a vague memory of we having a similar problem due to the ES instance being down?

peff commented 5 years ago

I never figured out the exact reason, but yes, a year or so ago the search database stopped working, which was solved by doing a rake search_clear && rake search_index && rake search_index_book. Unfortunately, that doesn't seem to work anymore, as the tire gem depends on an outdated rest-client (I get KeyError: key not found: :ciphers; some searching reveals that this is fixed in more recent versions).

The tire gem itself is deprecated. I suspect the right path forward is moving to a better supported elasticsearch client gem.

pedrorijo91 commented 5 years ago

on the Tire README file they recommend to look at https://github.com/elastic/elasticsearch-rails