I'm running into a issue with elastic search where if I use a common terms
query, it will not match the individual words in the query:
curl -XPOST "http://localhost:9200/myIndex/_search" -d'
{
"query" : {
"bool" : {
"should" : [
{
"common" : {
"fieldA" : {
"query" : "This is a sample sentence that I am
searching on"
}
}
},
{
"common" : {
"fieldB" : {
"query" : "This is another but completely different
sample sentence that I am searching on"
}
}
}
]
}
},
"filter" : {
"range" : {
"date" : {
"gte": "1998-10-30 00:00:00",
"lte": "1998-11-30 00:00:00"
}
}
}
}'
The issue I'm running into is that if my document contains the word
"sentence", it is not returned. However, if it contains the word "sentence s", it will be returned. I need it to return the documents that contain
the word "sentence".
I'm running into a issue with Elasticsearch where if I use a common terms
query, it will not match the individual words in the query:
curl -XPOST "http://localhost:9200/myIndex/_search" -d'
{
"query" : {
"bool" : {
"should" : [
{
"common" : {
"fieldA" : {
"query" : "This is a sample sentence that I am
searching on"
}
}
},
{
"common" : {
"fieldB" : {
"query" : "This is another but completely different
sample sentence that I am searching on"
}
}
}
]
}
},
"filter" : {
"range" : {
"date" : {
"gte": "1998-10-30 00:00:00",
"lte": "1998-11-30 00:00:00"
}
}
}
}'
The issue I'm running into is that if my document contains the word
"sentence", it is not returned. However, if it contains the word "sentence s", it will be returned. I need it to return the documents that contain
the word "sentence".
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.