-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 10.10
-
Fix Version/s: HOTFIX_10.10, 2021.x, 11.x
-
Component/s: Query & PageProvider
Following NXP-27168.
In the XXX project, we have tried to migrate some page provider in ElasticSearch using the replacer tag.
<replacer withClass="org.nuxeo.elasticsearch.provider.ElasticSearchNxqlPageProvider"> <!-- Collections --> <provider>all_user_collections</provider> <provider>ordered_content_collection</provider> <provider>default_content_collection</provider> <!-- CANNOT DO THE FOLLOWING BECAUSE https://jira.nuxeo.com/browse/NXP-27168 NOT FIXED --> <!-- <provider>user_collections</provider> --> <!-- <provider>default_collection</provider> --> <!-- <provider>default_collection_candidate</provider> --> <provider>tree_children</provider> </replacer>
By applying that configuration, we noticed that collections were not present anymore in webui.
We run some analysis with Thierry Martins and noticed that this issue is applicable for all PP that contain the following fixed predicate:
/*+ES: INDEX(dc:title.fulltext) OPERATOR(match_phrase_prefix) */
For exemple:
<coreQueryPageProvider name="default_collection"> <property name="maxResults">PAGE_SIZE</property> <pattern quoteParameters="false" escapeParameters="true"> SELECT * FROM Document WHERE /*+ES: INDEX(dc:title.fulltext) OPERATOR(match_phrase_prefix) */ dc:title ILIKE '?%' AND ecm:mixinType = 'Collection' AND ecm:primaryType != 'Favorites' AND ecm:isProxy = 0 AND ecm:mixinType != 'HiddenInNavigation' AND ecm:isVersion = 0 AND ecm:isTrashed = 0 </pattern> <sort column="dc:title" ascending="true" /> <pageSize>50</pageSize> </coreQueryPageProvider>
This seemed to be caused by the fulltext property applied in the title and do not return anything on empty values, unfortunately those PP are broadly used in webui with the absence of value.
Reproduce:
- Migrate default_collection using ES
- In Webui, click on the Collections button
- List of collections are empty:
The workaround is still the same as the one mentioned in NXP-27168.
There is a possibility whenever Nuxeo will support ES 7.10 to use the zero_terms_query option:
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query-phrase-prefix.html
- is related to
-
NXP-27168 Fix NXQL operator ILIKE when querying elasticsearch
- Resolved