# Problem with query

**URL:** <https://discuss.elastic.co/t/problem-with-query/11971>\
**Category:** Elasticsearch\
**Created:** [May 15, 2013, 10:35am UTC](https://discuss.elastic.co/t/problem-with-query/11971 "2013-05-15T10:35:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Kubat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martin_kubat/32/2340_2.png) [@Martin\_Kubat](https://discuss.elastic.co/u/Martin_Kubat)\
**Post date:** [May 15, 2013, 10:35am UTC](https://discuss.elastic.co/t/problem-with-query/11971/1 "2013-05-15T10:35:03Z")

</div>

Hi,  
I have a problem with query:

{  
"query": {  
"filtered": {  
"query": {  
"query\_string": {  
"query": "(s7d89s789s) AND django\_ct:("auth.user" OR  
"pluto.organization")",  
"default\_operator": "AND",  
"default\_field": "text"  
}  
}  
}  
},  
"from": 0,  
"size": 20  
}  
This query return some result by filter django\_ct, it's OK. But no result  
contains word "s7d89s789s".  
That is wrong?

Generator for this query is django-haystack, using AutoQuery.

Thanks  
Martin

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 15, 2013, 11:00am UTC](https://discuss.elastic.co/t/problem-with-query/11971/2 "2013-05-15T11:00:17Z")

</div>

When I validate this query, it seems to be doing the right thing:

curl -XGET '[http://127.0.0.1:9200/test/\_validate/query?pretty=1&explain=true](http://127.0.0.1:9200/test/_validate/query?pretty=1&explain=true)'  
-d '  
{  
"query\_string" : {  
"default\_field" : "text",  
"query" : "(s7d89s789s) AND django\_ct:("auth.user" OR  
"pluto.organization")",  
"default\_operator" : "AND"  
}  
}  
'

# {

# "\_shards" : {

# "failed" : 0,

# "successful" : 1,

# "total" : 1

# },

# "explanations" : [

# {

# "index" : "test",

# "explanation" : "+text:s7d89s789s +(django\_ct:auth.user

django\_ct:pluto.organization)",

# "valid" : true

# }

# ],

# "valid" : true

# }

Perhaps try the same validation query on your index? Perhaps the mapping is  
different?

clint

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:36am UTC](https://discuss.elastic.co/t/problem-with-query/11971/3 "2017-07-06T02:36:35Z")

</div>

Closed on July 6, 2017, 2:36am UTC


