Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
AWS OpenSearch (not sure where to find the version)
Describe the issue:
Newbie question, sorry.
All documentation I’ve seen for posting a document involves nesting the terms in a properties
object:
POST locations-b/_doc/
{
"properties": {
"zipcode" : "02134"
}
}
The document indexes successfully, and a match_all
query shows the doc. But if I go to search for it, this turns up 0 hits:
GET locations-b/_search
{
"query": {
"match": {"zipcode": "02134"}
}
}
In order to get hits, I need to specify the properties “container” in the query. This does work:
GET locations-b/_search
{
"query": {
"match": {"properties.zipcode": "02134"}
}
}
But none of the search examples in documentation show that properties.
needs to be specified in the query.
Am I doing something wrong? Or is this a quirk of the AWS implementation? Is there way to set up a mask or something so that it’s always implied? Thanks for any suggestions.
Relevant Logs or Screenshots: