Reputation: 4520
I'm trying to do a structured query with a lot of dynamic fields (potentially) in the search pattern. So far everything is good, except I want to be able to limit from the result by field that is not indexed. Is this possible?
The test search console is showing this error: "Syntax Error in query: field (fieldname) is not searchable"
Upvotes: 1
Views: 716
Reputation: 1
I figured this out by checking out the Cloudsearch console network payload.
If you are filtering by a facet field that is not marked searchable, you have to add a second query parameter: fq=<facetFieldName>&facet.<facetFieldName>={}
. This seems to filter the results as expected.
Upvotes: 0
Reputation: 872
All index fields that you intend to use for filtering should be marked as searchable:
Upvotes: 1