eZ Platform Discussions

Location error after activating Elasticsearch

I got following error after enabling ES from the .env file and use default settings.It looks like the keyword type rule dosen’t apply to path_string_id which cause aggregations and sorting issues in Elasticsearch.
Error occurs in every single location

eZ Platform Version 3.1 clean.

Please make sure that ES mapping are in place before content reindex: https://doc.ezplatform.com/en/latest/guide/search/elastic/#step-5-push-the-templates

If this will not help that I need to see your query to be able to reproduce the issue and say something more.

Hi @adam.wojs
I don’t think in this case that we have to provide a mapping on clean v3.1 installation, right?. The default dynamic_templates provide by the elastic bundle is enough.
The only thing that I have in my installation after the clean installation is the Netgen Tags bundle which provides a new FieldType, that may cause the issue I got, but not sure now. I can double check after deactivating this bundle if this is the source of this issue.

by the way I’m using Elastic 7.9.0 and I got this Deprecation when I try to push the template:

20:03:06 WARNING [app] Deprecation [“299 Elasticsearch-7.9.0-a479a2a7fce0389512d6a9361301708b92dff667 “legacy template [default] has index patterns [ * _ location _ *, * _ content _ * ] matching patterns from existing composable templates [metrics,logs] with patterns (metrics => [metrics- * - * ],logs => [logs- * - * ]); this template [default] may be ignored in favor of a composable template at index creation time””]

besides that I can’t find a significant relationship between the path_string_id issue and the Netgen Tags bundle but let me first give a try to disable it first ; - )

Could you please share your query executed via \eZ\Publish\API\Repository\SearchService::{findContent,findContentInfo,findLocation}? What kind of criteria and sort clauses are involved?

Hi @adam.wojs , I was not so far with the search queries. I changed the search engine in .env, then pushed the template, reindex and reload Backend UI.

Btw now the error is suddenly gone!
I did following:

  • Disable the tags bundle (although I’m not convinced that this is the source issue here)
  • Delete the default template from elastic
  • Delete the search index
  • push the template again
  • reindex

Now it works.

I activate the bundle again, delete, push the template and finally reindex

and it works also.

The Tags are properly indexed. I’ve checked also previous index and they were indexed.

Good to hear that! :wink: