Is it possible to search without using nested fields, achieving exact matches within the same object in an array in ElasticSearch?
Short answer: No
Explanation: In Elasticsearch, non-nested fields within an array are “flattened” at indexing time, so Elasticsearch doesn’t inherently recognize that individual field values in an array of objects are associated within the same object. Without the nested field type, fields in an array of objects are treated as if they were part of a single object, which means searches can’t distinguish between values belonging to separate objects.
Official explanation: The nested type is a specialised version of the object data type that allows arrays of objects to be indexed in a way that they can be queried independently of each other. https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html
Workaround: If you’re unable to use nested fields, another option is to restructure your data to avoid arrays of objects.