Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-41536

[N1QL+FTS] During verification set DefaultAnalyzer correctly in case "field" is not specified in FTS query

    XMLWordPrintable

    Details

    • Triage:
      Untriaged
    • Story Points:
      1
    • Is this a Regression?:
      Unknown

      Description

      Non-covering queries when the field name isn't specified - needs the query to look into the _all field (if available).

      As part of verification - in this situation we will need to set the analyzer for the default mapping correctly so non-analytic queries work correctly (keyword analyzer).

      Example index definition:

       {
        "type": "fulltext-index",
        "name": "default",
        "uuid": "558d7e033dff989e",
        "sourceType": "couchbase",
        "sourceName": "default",
        "sourceUUID": "37ad8b8f5d53e38f4fff0bbbc9175671",
        "planParams": {
          "maxPartitionsPerPIndex": 171,
          "indexPartitions": 6
        },
        "params": {
          "doc_config": {
            "docid_prefix_delim": "",
            "docid_regexp": "",
            "mode": "type_field",
            "type_field": "type"
          },
          "mapping": {
            "analysis": {},
            "default_analyzer": "standard",
            "default_datetime_parser": "dateTimeOptional",
            "default_field": "_all",
            "default_mapping": {
              "dynamic": true,
              "enabled": false
            },
            "default_type": "_default",
            "docvalues_dynamic": true,
            "index_dynamic": true,
            "store_dynamic": false,
            "type_field": "_type",
            "types": {
              "hotel": {
                "default_analyzer": "keyword",
                "dynamic": true,
                "enabled": true
              }
            }
          },
          "store": {
            "indexType": "scorch"
          }
        },
        "sourceParams": {}
      }

      Example query:

      SELECT * 
      FROM default AS d
      WHERE d.type='hotel'
      and search (d, {"query":{"wildcard":"*garden*"}})
      limit 1;

       

      The workaround without a fix is to use the field setting within the query.

        Attachments

          Issue Links

          For Gerrit Dashboard: MB-41536
          # Subject Branch Project Status CR V

            Activity

            Show
            abhinav Abhinav Dangeti added a comment - http://review.couchbase.org/c/n1fty/+/136492
            Hide
            abhinav Abhinav Dangeti added a comment -

            Fix should be available for 6.6.1 builds.

            While the fix has been merged into cheshire-cat builds, we'll still see this issue until we add go.mod for n1fty and n1fty uses the right version of bleve which includes the fix for MB-38957.

            Show
            abhinav Abhinav Dangeti added a comment - Fix should be available for 6.6.1 builds. While the fix has been merged into cheshire-cat builds, we'll still see this issue until we add go.mod for n1fty and n1fty uses the right version of bleve which includes the fix for MB-38957 .
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-6.6.1-9060 contains n1fty commit 1499e8d with commit message:
            MB-41536: Set defaultAnalyzer appropriately during verify/eval

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.1-9060 contains n1fty commit 1499e8d with commit message: MB-41536 : Set defaultAnalyzer appropriately during verify/eval
            Hide
            build-team Couchbase Build Team added a comment -

            Build couchbase-server-7.0.0-3145 contains n1fty commit 1499e8d with commit message:
            MB-41536: Set defaultAnalyzer appropriately during verify/eval

            Show
            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-3145 contains n1fty commit 1499e8d with commit message: MB-41536 : Set defaultAnalyzer appropriately during verify/eval
            Hide
            girish.benakappa Girish Benakappa added a comment -

            Verified in 6.6.1-9060 and 7.0.0 build 3739

            Show
            girish.benakappa Girish Benakappa added a comment - Verified in 6.6.1-9060 and 7.0.0 build 3739

              People

              Assignee:
              girish.benakappa Girish Benakappa
              Reporter:
              abhinav Abhinav Dangeti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty