Well that solution technically worked, however it appears it won’t fix my scenario as there could be hundreds of thousands of products (each one adding a distinct field mapping based on the product id). Not scalable as per the docs:
https://www.elastic.co/guide/en/elasticsearch/reference/6.4/mapping.html#mapping-limit-settings
Is there any different method of searching for these these docs (it’s represented as a collection) that doesn’t run into the following problem below? With String/text I’m actually able to concatonate with a combined field to get a match on an exact attribute, but with a number - not so much.
Using a BooleanQuery - Searching for productId of 00000000-0000-0000-0000-000000000000 and
attribute value 5000 would otherwise return ‘true’ in the following INVALID scenario:
[
{
"productId": "00000000-0000-0000-0000-000000000000",
"attributeValue: 405
},
{
"productId": "11111111-1111-1111-1111-111111111111",
"attributeValue: 5000
}
]
I need the search to find all docs where the productId of 00000000-0000-0000-0000-000000000000 has an attribute value of 5000.
Any help would be greatly appreciated - I’m sure I’m not the first to run into this scenario - but I’m a bit raw on the Elasticsearch side of things. Perhaps this should be a new thread - sorry about that.