Closed atomical closed 5 years ago
I think this is related to the fact that newer Sphinx versions support string filters, and so newer releases of Thinking Sphinx expect the filter values to be typed accordingly. This particularly comes into play when using params values, which are always strings.
And yes, as you've noted, the solution is to cast the string values to their appropriate types - so, in this case, the example_id
value needs to be an integer or array of integers.
Did older versions of TS perform the type casting? We haven't upgraded sphinx.
Yup, older versions of TS (well, actually Riddle under the hood) would cast all string values to integers, because it could safely presume back then that string values were never actually meant to be strings.
That clears that mystery up. Thanks!
I am running thinking-sphinx (4.4.1) with
ThinkingSphinx::Index.define(:document, :with => :active_record) do indexes comment, :as => :comment indexes pages.content, :as => :page_content has taggings.tag_id, :type => :integer, :as => :tags has created_at, :sortable => true end
Getting the following error message
SELECT * FROM document_core
WHERE tags
IN ('10') AND sphinx_deleted
= 0 ORDER BY created_at
desc, id
DESC LIMIT 0, 30; SHOW META;
with error message: index document_core: unsupported filter type '(filter-type-6)' on MVA column
My problem seems related, if I remove qoutes manually, it works. But I tried different in the index definition, and thinking sphinx keeps adding the qoutes (regardless the type I am using) :-(
We were running Sphinx queries in 3.1.4 that filtered correctly. They looked like this:
In 4.0.0 we got this error because the integer is in quotes.
That's an easy fix, but I'm curious what changed in the library.