-
Notifications
You must be signed in to change notification settings - Fork 67
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
Zero results when search by association id #104
Comments
Which version of Thinking Sphinx are you using? I think you'll need to update that at the same time as updating Riddle. |
In particular, you'll want to either upgrade to TS v3.4.0, or cast any filter values to their appropriate types - so, in this case, the If you upgrade to TS v4, you'll also want to do this casting - TS v3.4 just puts in some extra work to do the casting for you (but it means running a search requires a lot more computation). The reason for this change is that Riddle (and TS) presumed that string values couldn't be filterable, so it would not surround them in quotes. However, Sphinx has supported string filters for a while now, hence sometimes quotes are needed, and that's now figured out based on the types of the arguments. |
I was using TS v3.2. Updating to 3.4.0 seems to fix the problem. Thanks for the explanation. |
Great to know it's working properly again :) I do recommend upgrading to v4 if possible - which will mean casting values appropriately - but I understand that might take a bit more time! |
After updating riddle from 1.5.12 to 2.3.2 the following query returns 0 results.
User.search("", { with: { post_id: ["24"] }, sql: { include: [:post] } } )
Sphinx Query (1.6ms) SELECT * FROM
user_core
,user_delta
WHEREpost_id
IN ('24') ANDsphinx_deleted
= 0 LIMIT 0, 20Sphinx Found 0 results
Reverting the version back the query works correctly.
The text was updated successfully, but these errors were encountered: