Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Index definition:
"testIndex": { "jcr:primaryType": "nt:unstructured", "analyzed": true, "type": "Long", "name": "propa" }
Data:
/test/a [propa = 1234 ] /test/b [propa = "1234"] /test/c [propa = "1234a"]
The following query executed with Elastic:
/jcr:root//*[jcr:contains(@propa, '123*')]
fails with:
14:28:51.713 ERROR [I/O dispatcher 1] ElasticResultRowAsyncIterator.java:326 Error retrieving data from Elastic: closing scanner, notifying listeners co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/search] failed: [search_phase_execution_exception] all shards failed at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:281) at co.elastic.clients.transport.rest_client.RestClientTransport.access$200(RestClientTransport.java:63)
The detailed error is not shown in the logs, but can be found by repeating the query directly to Elastic:
"Can only use prefix queries on keyword, text and wildcard fields - not on [propa] which is of type [long]
The same query executes correctly with Lucene.
Analysis
The root cause of the problem is that the Elastic plugin does not create a field for full text search on typed properties:
Therefore, it is not possible to run full text queries on this index.
Attachments
Issue Links
- is related to
-
OAK-9910 Full-text queries fail in Boolean analyzed fields when executed over Elastic
-
- Open
-
- links to