Hello,
First post and I cannot seem to find the answer by searching the forum or
internet. We are very new to elasticsearch, and I am integrating it into
our app.
I build an index based on what I thought was a simple example document with
some single value fields and an array of "Fields", which is a structure
containing a string "FieldName" amongst other things.
When I use a simple rest tester and post the following query, I get the
expected results of all documents having a field named "ContentBody"
(please note that this query is going to evolve into more and logic):
{
"size": "20",
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"and": [
{"query" : {"query_string" : {"fields" :
["Fields.FieldName"], "query" : "ContentBody"}}}
]
}
}
}
}
However, this query does not return any results:
{
"size": "20",
"query": {
"filtered": {
"query": {"match_all": {}},
"filter": {
"and": [
{"term" : {"Fields.FieldName": "ContentBody"}},
]
}
}
}
}
This is all off default mapping. I am sure I am missing something brain
dead simple about the way the term query works, and any insights are
appreciated.
Thank you
--