Multiple word queries not returning any results

Sorry if I'm doing something silly, but for some reason I'm not getting any
results for multi-word queries. Everything works perfectly fine when I
search for single words, but the second I add a space everything breaks
down. My settings file is up here:

And the actual query I'm sending in is:

{'query': {'term': {'searchable_text': u'huge capacitor'}},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '2',
'size': '2'},
'text': u'huge capacitor'}}}

To the url:

http://localhost:9200/index-1,index-2,index-3/_search

I'm sending the data with a get request.

Am I doing something silly here? The suggestion results come back perfectly fine, I just never get any search results.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Term queries aren't analyzed so it is looking for the exact term "huge
capacitor" which might find something given that it looks like you using
a shingle filter but normally I'd use a query string or phrase search to
look for multiple words.

On Mon, Aug 5, 2013 at 11:21 AM, Slater Victoroff svictoroff@edx.orgwrote:

Sorry if I'm doing something silly, but for some reason I'm not getting
any results for multi-word queries. Everything works perfectly fine when I
search for single words, but the second I add a space everything breaks
down. My settings file is up here:
https://gist.github.com/Slater-Victoroff/6156734

And the actual query I'm sending in is:

{'query': {'term': {'searchable_text': u'huge capacitor'}},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '2',
'size': '2'},
'text': u'huge capacitor'}}}

To the url:

http://localhost:9200/index-1,index-2,index-3/_search

I'm sending the data with a get request.

Am I doing something silly here? The suggestion results come back perfectly fine, I just never get any search results.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I changed my query to:

{'query_string': {'default_field': 'searchable_text', 'query': u'huge capacitor'},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '1',
'size': '2'},

'text': u'huge capacitor'}}}

But I'm getting an error on query_string. Sorry, I haven't used query
strings before. I tried just following this example:
http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query/
It looks like I've done something wrong though, is there a better place to
look for constructing query strings?

On Monday, August 5, 2013 11:33:05 AM UTC-4, Nikolas Everett wrote:

Term queries aren't analyzed so it is looking for the exact term "huge
capacitor" which might find something given that it looks like you using
a shingle filter but normally I'd use a query string or phrase search to
look for multiple words.

On Mon, Aug 5, 2013 at 11:21 AM, Slater Victoroff <svict...@edx.org<javascript:>

wrote:

Sorry if I'm doing something silly, but for some reason I'm not getting
any results for multi-word queries. Everything works perfectly fine when I
search for single words, but the second I add a space everything breaks
down. My settings file is up here:
https://gist.github.com/Slater-Victoroff/6156734

And the actual query I'm sending in is:

{'query': {'term': {'searchable_text': u'huge capacitor'}},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '2',
'size': '2'},
'text': u'huge capacitor'}}}

To the url:

http://localhost:9200/index-1,index-2,index-3/_search

I'm sending the data with a get request.

Am I doing something silly here? The suggestion results come back perfectly fine, I just never get any search results.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ah, sorry, I figured it out, didn't realize it had to be a part of a query
itself. Many thanks for pointing me in the right direction! This was the
query I ended up with:

{'query': {'text': {'searchable_text': u'huge capacitor'}},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '1',
'size': '2'},
'text': u'huge capacitor'}}}

On Monday, August 5, 2013 11:44:09 AM UTC-4, Slater Victoroff wrote:

I changed my query to:

{'query_string': {'default_field': 'searchable_text', 'query': u'huge capacitor'},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '1',
'size': '2'},

'text': u'huge capacitor'}}}

But I'm getting an error on query_string. Sorry, I haven't used query
strings before. I tried just following this example:
http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query/

It looks like I've done something wrong though, is there a better place to
look for constructing query strings?

On Monday, August 5, 2013 11:33:05 AM UTC-4, Nikolas Everett wrote:

Term queries aren't analyzed so it is looking for the exact term "huge
capacitor" which might find something given that it looks like you using
a shingle filter but normally I'd use a query string or phrase search to
look for multiple words.

On Mon, Aug 5, 2013 at 11:21 AM, Slater Victoroff svict...@edx.orgwrote:

Sorry if I'm doing something silly, but for some reason I'm not getting
any results for multi-word queries. Everything works perfectly fine when I
search for single words, but the second I add a space everything breaks
down. My settings file is up here:
https://gist.github.com/Slater-Victoroff/6156734

And the actual query I'm sending in is:

{'query': {'term': {'searchable_text': u'huge capacitor'}},
'suggest': {'searchable_text_suggestions': {'term': {'field': 'searchable_text',
'max_term_freq': '2',
'size': '2'},
'text': u'huge capacitor'}}}

To the url:

http://localhost:9200/index-1,index-2,index-3/_search

I'm sending the data with a get request.

Am I doing something silly here? The suggestion results come back perfectly fine, I just never get any search results.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.