Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25709

Fix usage of boost in Elasticsearch hints

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 9.10-HF18, 10.3
    • Component/s: Elasticsearch
    • Release Notes Summary:
      The boost is correctly applied to Elasticsearch hints.
    • Tags:
    • Backlog priority:
      900
    • Sprint:
      nxAI Sprint 10.3.6
    • Story Points:
      3

      Description

      Running the following query

      SELECT * FROM Document WHERE /*+ES: INDEX(dc:title.fulltext^5, dc:description.fulltext^2) */ ecm:fulltext = 'workspaces'
      

      will produce this request for Elasticsearch

      curl -XGET 'http://localhost:9200/nuxeo/doc/_search?pretty&search_type=dfs_query_then_fetch' -d '{
        "from" : 0,
        "size" : 20,
        "query" : {
          "simple_query_string" : {
            "query" : "workspaces",
            "fields" : [
              "dc:description.fulltext^2^1.0",
              "dc:title.fulltext^5^1.0"
            ],
            "analyzer" : "fulltext",
            "flags" : -1,
            "default_operator" : "and",
            "lenient" : false,
            "analyze_wildcard" : false,
            "boost" : 1.0
          }
        },
        "_source" : {
          "includes" : [
            "_id"
          ],
          "excludes" : [ ]
        }
      }'
      

      It will not return any result because of the incorrect syntax for the fields, with the "double" boost:

      • "dc:title.fulltext^5^1.0" instead of "dc:title.fulltext^5"
      • "dc:description.fulltext^2^1.0" instead of "dc:description.fulltext^2

      Some tests were fixed by NXP-22812 and https://github.com/nuxeo/nuxeo/commit/b1142916b5375ccc404d4d82c4fad4a9423deefc#diff-bc1aff12adf72f470c46a5a02193628fR1406 because of this new syntax, but it does not work.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours
                  5h