Is there any maximum query length in TS?

162 views
Skip to first unread message

Sam

unread,
Nov 19, 2011, 9:33:56 AM11/19/11
to thinkin...@googlegroups.com
I have pretty big queries (about 7000 symbols)

When I'm searching using sphinx cli tool - I'm getting some results

$ search -c config/development.sphinx.conf -i commodity_core --any query

using config file 'config/development.sphinx.conf'...
index 'commodity_core': query '': returned 1000 matches of 1225141 total in 0.058 sec


When I'm searching, using TS or riddle - I'm getting nothing.

>> Commodity.search(kw, :match_mode => :any)
/Users/Sam/prj/gdeslon/vendor/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/search.rb:268
=> []


>> client = Riddle::Client.new 'localhost', 9312
=> #<Riddle::Client:0x109580ef8 @retry_delay=0, @sort_mode=:relevance, @limit=20, @select="*", @group_clause="@group desc", @rank_mode=:proximity_bm25, @id_range=0..0, @socket=nil, @retry_count=0, @match_mode=:all, @overrides={}, @group_function=:day, @queue=[], @index_weights={}, @weights=[], @timeout=0, @cut_off=0, @max_matches=1000, @field_weights={}, @group_by="", @servers=["localhost"], @anchor={}, @sort_by="", @port=9312, @group_distinct="", @offset=0, @key=nil, @max_query_time=0, @filters=[]>
>> client.match_mode = :any
=> :any
>> client.query kw, 'commodity_core', 'comment'

=> {:status=>3, :total=>0, ..............bla-bla-bla.............. :warning=>"too many words (481) for quorum; replacing with an AND", :time=>0.433, :matches=>[]}




Pat Allan

unread,
Nov 19, 2011, 11:22:40 PM11/19/11
to thinkin...@googlegroups.com
Hi Sam

The search CLI tool isn't always the best way of checking these things - it doesn't use the Sphinx daemon (it works when Sphinx isn't running), so I think it reads the index files itself.

And given the query doesn't work with Riddle, it's not a Thinking Sphinx issue, but a limitation in Sphinx itself (hence the warning in the response from Riddle). Not sure why it's talking about quorum though, if you're using the :any match mode - are there any quorum operators in your query? They're quoted words followed by a backslash and number:
"foo bar baz"/2

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/t77aKkr-MgEJ.
> 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.

Sam

unread,
Nov 20, 2011, 5:43:52 AM11/20/11
to thinkin...@googlegroups.com
Right, I've removed all chars except alphabetical and all quorum mentions have disappeared.

But still no matches if query is longer that 450-550 chars.

Pat Allan

unread,
Nov 20, 2011, 5:46:04 AM11/20/11
to thinkin...@googlegroups.com
When testing via Riddle, are there any warnings or errors?

--
Pat

On 20/11/2011, at 5:43 PM, Sam wrote:

> Right, I've removed all chars except alphabetical and all quorum mentions have disappeared.
>
> But still no matches if query is longer that 450-550 chars.
>

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/H00x26h9GSMJ.

Sam

unread,
Nov 20, 2011, 5:48:32 AM11/20/11
to thinkin...@googlegroups.com
sorry, haven't noticed that. Riddle says:

:warning=>"too many words (1026) for quorum; replacing with an AND"

Why too many? How to fix it?

Sam

unread,
Nov 20, 2011, 6:08:02 AM11/20/11
to thinkin...@googlegroups.com
Why sphinx is talking about quorum at all?

I'm in match_mode = :any

>> client
=> #<Riddle::Client:0x1094844c8 @retry_delay=0, @sort_mode=:relevance, @limit=20, @select="*", @group_clause="@group desc", @rank_mode=:proximity_bm25, @id_range=0..0, @socket=nil, @retry_count=0, @match_mode=:any, @overrides={}, @group_function=:day, @queue=[], @index_weights={}, @weights=[], @timeout=0, @cut_off=0, @max_matches=1000, @field_weights={}, @group_by="", @servers=["localhost"], @anchor={}, @sort_by="", @port=9312, @group_distinct="", @offset=0, @key=nil, @max_query_time=0, @filters=[]>

Pat Allan

unread,
Nov 21, 2011, 7:12:25 AM11/21/11
to thinkin...@googlegroups.com
Hi Sam

Not sure why Sphinx is talking about quorum - could be a question to ask on the Sphinx forum. Probably the best place to ask why the query isn't working as well - as it's definitely an issue with Sphinx itself.
http://sphinxsearch.com/forum/index.html

--
Pat

> --
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/thinking-sphinx/-/E_gHbf7JQ5cJ.

Sergey

unread,
Nov 21, 2011, 1:24:27 PM11/21/11
to thinkin...@googlegroups.com
thanks, Pat

already done

Reply all
Reply to author
Forward
0 new messages