I have a product search index with a field "productOptions", that contains serialized JSON, meaning it may contain either an empty array for products with no options, or an array with options for products with product options:
[]
[{ optionId: "", ... }]
When I try the query +productOptions: "[]"
in Luke (using the StandardAnalyzer) I don't get any matches. I was under the impression that StandardAnalyzer will search not analyzed fields as long as there is an exact match - so I don't understand why I'm not getting any hits. However, if I switch over to KeywordAnalyzer I do get hits, but can't use KeywordAnalyzer since I'm querying product options as part of a more complex search query that requires StandardAnalyzer.
How can I write a query that finds all products with no options (i.e. productOptions == [])?
Note: I have no control over the indexing process, so I can't control the values being indexed.