[
https://issues.apache.org/jira/browse/OAK-9705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Fabrizio Fortino resolved OAK-9705.
-----------------------------------
Fix Version/s: 1.60.0
Resolution: Fixed
> Explain Query tool doesn't show the correct ES query when suggest queries are
> made
> ----------------------------------------------------------------------------------
>
> Key: OAK-9705
> URL: https://issues.apache.org/jira/browse/OAK-9705
> Project: Jackrabbit Oak
> Issue Type: Bug
> Reporter: Jun Zhang
> Assignee: Fabrizio Fortino
> Priority: Major
> Fix For: 1.60.0
>
>
> When running the following suggest query from AEM(ES index is available)
> {code}
> SELECT [rep:suggest()] FROM [dam:Asset] as s WHERE SUGGEST('jav')
> option(index name [damAssetElastic-7-custom-2])
> {code}
> the detailed plan show that the following query is run on ES side:
> {code}
> {"bool":\{"must":[{"query_string":{"query":"suggest?term=jav","fields":[],"type":"best_fields","default_operator":"or","max_determinized_states":10000,"enable_position_increments":true,"fuzziness":"AUTO","fuzzy_prefix_length":0,"fuzzy_max_expansions":50,"phrase_slop":0,"escape":false,"auto_generate_synonyms_phrase_query":true,"fuzzy_transpositions":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}
> {code}
> Instead, the following query is actually run on ES side:
> {code}
> POST cm-p11553-e21096-publish._damassetelastic-7-custom-2/_search
> {
> "query": {
> "bool": {
> "must": [
> {
> "nested": {
> "path": ":suggest",
> "query": {
> "match_phrase_prefix": {
> ":suggest.value": {
> "query": "jav"
> }
> }
> }
> }
> }
> ],
> "adjust_pure_negative": true,
> "boost": 1
> }
> }
> }
> {code}
> the Explain query should reflect the correct ES query as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)