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

SEARCH_META().fields is not covering

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes

    Description

      Found By: Likith B

      Install travel sample

      curl -s -u Administrator:password http://localhost:8094/api/index/fix1 -H "Content-Type: application/json" -XDELETE
      curl -s -u Administrator:password http://localhost:8094/api/index/fix1 -H "Content-Type: application/json" -XPUT -d '{
       "name": "fix1",
       "type": "fulltext-index",
       "params": {
        "mapping": {
         "default_mapping": {
          "enabled": true,
          "dynamic": true
         },
         "default_type": "_default",
         "default_analyzer": "standard",
         "default_datetime_parser": "dateTimeOptional",
         "default_field": "_all",
         "store_dynamic": false,
         "index_dynamic": true
        },
        "store": {
         "indexType": "scorch",
         "kvStoreName": ""
        },
        "doc_config": {
         "mode": "type_field",
         "type_field": "type",
         "docid_prefix_delim": "",
         "docid_regexp": ""
        }
       },
       "sourceType": "couchbase",
       "sourceName": "travel-sample",
       "sourceUUID": "",
       "sourceParams": {},
       "planParams": {
        "maxPartitionsPerPIndex": 171,
        "numReplicas": 0
       },
       "uuid": ""
      }'
      

      EXPLAIN
      SELECT smeta.fields 
      FROM `travel-sample` AS t1
       LET smeta = SEARCH_META(t1) 
      WHERE SEARCH(t1, { "query": { "query": "United States"}, "fields":["country"]});
      

      LET is function. Some reason we don't cover function (base) and some fields referenced.

      Problem there from beginning. But one use case (LET) use to work, second (non LET, i.e inline) never worked.
      MB-59642 fix exposed the issue and caused working use case no longer work. Fix will fix both

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              likith.b Likith B
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty