Hi there,
I am running ES 1.2.1, JRE build 1.7.0_51-b13, OS X 10.9.4 and am trying to
query with a "query_string" query for an exact infix match within a
not_analyzed field containing punctuation or other special chars.
Using /_validate/query?explain I found out that the query with quotes is
analyzed differently depending on the field queried being "not_analyzed" or
just of the standard-tokenized type "string". In the former case quotes are
seemingly ignored leading to a query that looks wrong (for lucene because
of the intentional quotes being removed):
query part:
{
"query": {
"query_string": {
"query": "content_test_txt:("volume, offered")"
}
}
}
not_analyzed field:
"explanations": [
{
"index": "index_dev",
"valid": true,
"explanation": "(content_test_txt:volume, offered)"
}
]
analyzed field:
{
"query": {
"query_string": {
"query": "content_test:("volume, offered")"
}
}
}
"explanations": [
{
"index": "index_dev",
"valid": true,
"explanation": "(content_test:"volume offered")"
}
]
The former is missing the quotes and the later is missing (due to query
parsing, tokenization I assume) the for my search significant punctuation
",".
Is this query parsing behavior intentional and is there another way to find
exact matches containing possibly escape lucene special chars or
punctuation?
I am grateful for any thoughts on this.
Thank you,
Frederik
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bbd66542-df59-485f-815a-8c9e4ea9263f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.