bad multi-query count error

146 views
Skip to first unread message

adamcooper

unread,
Dec 23, 2010, 8:29:56 PM12/23/10
to Thinking Sphinx
Hey Pat,

I just upgraded to Rails 3.0.3 from Rails 3.0.1 and upgrade to TS
2.0.1.

Now, we are getting this error:

Riddle::ResponseError (searchd error (status: 1): bad multi-query
count 0 (must be in 1..32 range)):
riddle (1.2.2) lib/riddle/client.rb:629:in `request'
riddle (1.2.2) lib/riddle/client.rb:221:in `run'
thinking-sphinx (2.0.1) lib/thinking_sphinx/bundled_search.rb:39:in
`populate'
thinking-sphinx (2.0.1) lib/thinking_sphinx/bundled_search.rb:20:in
`searches'
thinking-sphinx (2.0.1) lib/thinking_sphinx/search.rb:73:in
`bundle_searches'
thinking-sphinx (2.0.1) lib/thinking_sphinx/facet_search.rb:47:in
`populate'
thinking-sphinx (2.0.1) lib/thinking_sphinx/facet_search.rb:13:in
`initialize'
thinking-sphinx (2.0.1) lib/thinking_sphinx/search_methods.rb:422:in
`new'
thinking-sphinx (2.0.1) lib/thinking_sphinx/search_methods.rb:422:in
`facets'

When we make this call:

ThinkingSphinx.facets("keyword" -
{:conditions=>{}, :all_facets=>true, :per_page=>10, :page=>1, :retry_stale=>true, :class_facet=>false, :classes=>[ClassName], :sort_mode=>:extended, :order=>"@relevance
DESC", :star=>true, :with_all=>{}, :with=>{}}

Not sure what to make of this.

Thanks,
Adam

Pat Allan

unread,
Dec 23, 2010, 11:59:12 PM12/23/10
to thinkin...@googlegroups.com
Hi Adam

Firstly - how many facets are being queried? And what version of Sphinx? Also - what version of TS were you using previously - I didn't think anything had changed around facet queries between 2.0.0 and 2.0.1.

Cheers

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>

adamcooper

unread,
Dec 24, 2010, 1:06:51 PM12/24/10
to Thinking Sphinx
Hi Pat,

I'm not sure what you mean by how many facets are being queried?

Sphinx version is 0.9.9 release.

The previous version of thinking sphinx was from my fork that was
essentially this commit:
https://github.com/freelancing-god/thinking-sphinx/commit/c3891e07723fd5bae0ed8653599068c0f775d3a9

The specific commit we were using from my fork was:
https://github.com/adamcooper/thinking-sphinx/commit/396aea2e7ba3b2a3d07c7d60fe03c3cbc60dbf63

This error happened after merging in the latest rails3 branch from
freelancing-god/thinking-sphinx repository. (Yesterday)

I verified the error also happens on a clean 2.0.1 gem install. (Ie.
not using my fork)

Thanks,
Adam

Pat Allan

unread,
Dec 26, 2010, 4:39:54 AM12/26/10
to thinkin...@googlegroups.com
Hi Adam

Thanks for double-checking with the standard release. What I meant by the number of facets is how many different facets do you have defined across all of your models? And how many if you consider just uniquely named facets? (ie: two facets with the same name in different models count as just one).

Doesn't explain why the count is wrong, but just curious, maybe it'll give me a hint to the cause.

Cheers

--
Pat

adamcooper

unread,
Dec 27, 2010, 11:23:57 PM12/27/10
to Thinking Sphinx
We have 7 models that have indexes defined.

There is a total of four facets. Two integer and two MVA. (These are
spread across two models)

There are two unique facets. (The two models have the same facet
names)

The ClassName that is being filtered on doesn't have any facets
defined.

Thanks,
Adam

On Dec 26, 1:39 am, Pat Allan <p...@freelancing-gods.com> wrote:
> Hi Adam
>
> Thanks for double-checking with the standard release. What I meant by the number of facets is how many different facets do you have defined across all of your models? And how many if you consider just uniquely named facets? (ie: two facets with the same name in different models count as just one).
>
> Doesn't explain why the count is wrong, but just curious, maybe it'll give me a hint to the cause.
>
> Cheers
>
> --
> Pat
>
> On 25/12/2010, at 5:06 AM, adamcooper wrote:
>
>
>
>
>
>
>
> > Hi Pat,
>
> > I'm not sure what you mean by how many facets are being queried?
>
> > Sphinx version is 0.9.9 release.
>
> > The previous version of thinking sphinx was from my fork that was
> > essentially this commit:
> >https://github.com/freelancing-god/thinking-sphinx/commit/c3891e07723...
>
> > The specific commit we were using from my fork was:
> >https://github.com/adamcooper/thinking-sphinx/commit/396aea2e7ba3b2a3...

Pat Allan

unread,
Dec 27, 2010, 11:28:41 PM12/27/10
to thinkin...@googlegroups.com
Oh... so why are you running a facets query on a class that has no facets?

Granted, TS should handle this situation and just return an empty search result.

--
Pat

Pat Allan

unread,
Dec 27, 2010, 11:32:29 PM12/27/10
to thinkin...@googlegroups.com
Have just patched TS to fix this - feel free to merge into your fork :)

--
Pat

adamcooper

unread,
Jan 1, 2011, 8:35:36 PM1/1/11
to Thinking Sphinx
Thanks Pat!

We don't have any good reason why we are running a facets query with
no facets defined. :(

Cheers,
Adam

Avi Flombaum

unread,
Jan 11, 2011, 12:04:43 PM1/11/11
to Thinking Sphinx
Is it possible that the fix (return if facet_names.empty? in populate
in facet_search.rb) did not make it into the 1.4.1 gem? I'm looking at
the source locally, and it's not there, yet is on github.

Pat Allan

unread,
Jan 12, 2011, 7:12:35 AM1/12/11
to thinkin...@googlegroups.com
Hi Avi

That's correct - 1.4.1 came out well before this fix. I'll try to get a new release out over the next few days - there's at least one other patch I want to make first.

In the meantime, you could grab the code from Github, and run the following commands (I think it'll do the job):
bundle
rake build
gem install pkg/thinking-sphinx-1.4.1.gem --local

--
Pat

Reply all
Reply to author
Forward
0 new messages