readthedocs / readthedocs-sphinx-search

Deprecated: Enable search-as-you-type feature for docs hosted by RTD.
https://readthedocs-sphinx-search.readthedocs.io/
MIT License
33 stars 16 forks source link

Not working as specified #70

Open markcmiller86 opened 4 years ago

markcmiller86 commented 4 years ago

Am testing features here and have some observations...

So, either I am wholly mis-understanding how this is supposed to work or the search functionality is not working as documented.

stsewd commented 4 years ago

The first thing is a known problem https://github.com/readthedocs/readthedocs-sphinx-search/issues/58.

The second and third are related to rtd itself, not the extension. We use https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html#simple-query-string-syntax, so you need to escape those queries.

stsewd commented 4 years ago

Also, if you are really trying to use the + or | operators, we always run all queries with those operands already.

markcmiller86 commented 4 years ago

Apologies but I'm confused by your response.

Indeed, I am not trying to search for literal + or | or - as characters in the search results. I am trying to use those character as operators as described in the simple query string documentation you reference which explicitly states...

To use one of these characters literally, escape it with a preceding backslash ().

which I am NOT trying to do. I really want to test the behavior of those query operators and so far, my tests don't seem to be indicating those operators are really working.

Neither do they appear to work with the examples provided here. Trying it auto* redirect* (hit enter), RTD says 46 pages and auto* +-redirect* returns 50 pages). How can that be correct? The 2nd should be more restrictive than the 1rst.

Finally escaping the operators makes no difference. Is as if I didn't type them at all. Same behavior in Safari, Chrome and Firefox. If you'd like, I can upload video of behavior. Maybe from that you can tell me what I am doing wrong?