Elasticsearch index problem

Hey! Have a problem with a MediaDocument index in Elastic. It works in my local environment, but I’m getting this log message in Test:

The remote server returned an error: (400) Bad Request… Call: Status code 400 from: POST /xxxx-test-mediadocument.invariant/_search?typed_keys=true. ServerError: Type: search_phase_execution_exception Reason: “all shards failed” CausedBy: "Type: illegal_argument_exception Reason: “Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [brand] in order to load field data by uninverting the inverted index. Note that this can use significant memory.”

The index is built, the error occurs when I access the page which uses the MediaDocuments. The model has the Nest Keyword attribute attached to the Brand property.

If I change the prefix the index is not built at all. No documents are added, even though everything looks fine in the DocumentBuilder class, no errors or exceptions there.

Any ideas what else I could do?

Litium version: [7.6.1]

Did you try with [Keyword] attribute on your Brand field?

Got it set up like this

[Keyword]
public string Brand { get; set; }
	"brand": {
		"type": "keyword"
     },

Have not tried the fielddata suggestion though. It didn’t sound like a good solution given the use of significant memory

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.