(encoded) ? character in the search string produces no results

5 views
Skip to first unread message

Walter Lee Davis

unread,
Aug 2, 2022, 4:00:18 PM8/2/22
to thinkin...@googlegroups.com
I am using ThinkingSphinx latest, with Manticore fairly recent, and an upgraded Rails 7 application. If the details matter a lot, I can dig in and find them. But I have discovered an odd edge case. When the user enters a search string that ends with a ? (which gets properly encoded in the form submission as %3F), the search returns no results. When that character is stripped off, I get lots of results.

There are no errors in Rails logging related to this, both return a 200. The no results shows my regular "no results" page, and there is no further detail from the search engine (although I do not know off-hand where to tail its logs).

Please let me know if there is anything I can do of a debugging nature to make this easier to diagnose. This site has been running for a very long time, and only recently upgraded to the latest version of TS along with the Rails 7 upgrade. No further changes were made to the site beyond the modernization of the configuration etc. as outlined in the Wiki.

Thanks in advance,

Walter

Walter Lee Davis

unread,
Aug 2, 2022, 4:08:07 PM8/2/22
to thinkin...@googlegroups.com
Following up: the search results controller is as follows:

```
class ResultsController < ApplicationController
def index
@results = []
if params[:q].present?
@results = ThinkingSphinx.search(ThinkingSphinx::Query.escape(params[:q].to_s), :excerpts => {
# :limit => 1000,
:around => 40,
:force_all_words => true,
:chunk_separator => ' &#8230; '
}, page: params[:page])
@results.context[:panes] << ThinkingSphinx::Panes::ExcerptsPane
end
end
end

```

This is virtually unchanged for years.

Walter
> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/73E33C92-C658-46E2-826F-1EEE831617E7%40wdstudio.com.

Walter Lee Davis

unread,
Aug 2, 2022, 4:34:50 PM8/2/22
to thinkin...@googlegroups.com
Oh, fascinating. I am using manticore locally, but sphinxsearch on the server. That might explain why this works perfectly on my Mac...

Walter
> To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/D988AA4A-EE80-4998-B908-325B0C3D945C%40wdstudio.com.

Walter Lee Davis

unread,
Aug 2, 2022, 5:23:58 PM8/2/22
to thinkin...@googlegroups.com
Thanks again, Pat, for making such a wonderful tool for all of us to enjoy as if it was a toaster we bought at Target. I needed to upgrade Manticore on the server. Once I did, and stumbled through enough of the post upgrade process necessary to get the Rake task to work, I was able to rebuild my index and start the server and all's well with the world.

For anyone who comes along after me, the key to getting the server to work was to turn it off in systemd (apt had put it back on), delete the old config folder in /etc/manticoresearch (I just nuked that entire folder), and then use the Rake task to rebuild the indices. Everything Just Worked™.

Walter
> To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/5F9CCD8A-2EAC-49C2-85A7-D894590E18A3%40wdstudio.com.

Pat Allan

unread,
Aug 11, 2022, 2:14:21 PM8/11/22
to 'jason...@me.com' via Thinking Sphinx
Thanks Walter - a delayed response, but very happy to see you’ve got the solution all figured out without my input 😁 and glad to know TS is still largely working well for you! :)
> To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/5182FB49-106F-43C9-B6C7-564F5B72E9A4%40wdstudio.com.

Reply all
Reply to author
Forward
0 new messages