This certainly isn't the expected behaviour… what happens with a normal search
query? And have you added in that filter logging yourself?
--
Pat
On 17/10/2011, at 2:54 PM, gonzoprosperity wrote:
> I have an index defined like:
>
> define_index do
> indexes(name, :sortable => true)
> indexes(code, website)
> has :id, :as => :client_id
> set_property :delta => true
> set_property :enable_star => true
> set_property :min_prefix_len => 3
> end
>
> In some instances I just want to grab IDs and counts. And I need to
> filter on 'client_id', so:
>
> query = "fillmore"
> client_ids = [10, 15, 20]
> Client.search_count("#{query}*", {:with => {:client_id =>
> client_ids}})
>
> Yields lines like this in the console:
>
> Sphinx Query (14.2ms) fillmore* {:with=>{:client_id=>[10, 15, 20]}}
> Sphinx Found 0 results
>
>
> But I ask for the IDs via:
>
> Client.search_for_ids("#{query}*", {:with => {:client_id =>
> client_ids}})
> Sphinx Query (8.7ms) fillmore*
> Sphinx Found 1 result
>
> So my question is:
>
> I am specifying :with in both queries but according to the debug
> output, TS (or Sphinx?) is only using it in the first query, but I
> need both queries to respect it.
>
> Is there something I am doing wrong?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/thinking-sphinx?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.