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

Query: SEARCH() query execution failed - prefix query

    XMLWordPrintable

Details

    • Triaged
    • 1
    • Yes

    Description

      build: 7.0.0-4960

      create cluster:

      {kv, index, fts, n1ql}

      create bucket `default`

      load document:

      {
        "emp_id": "10000001",
        "name": "Kory Palmer",
        "dept": "Engineering",
        "email": "kory@mcdiabetes.com",
        "salary": 75891.68,
        "join_date": "2015-08-13T09:30:00",
        "languages_known": [
          "Quechua",
          "Portuguese",
          "Africans"
        ],
        "is_manager": true,
        "mutated": 0,
        "type": "emp",
        "manages": {
          "team_size": 6,
          "reports": [
            "Hedda Wright",
            "Callia Robinson Sr.",
            "Trista Baker III",
            "Joby Allen",
            "Basha Foster",
            "Salina Allen"
          ]
        }
      }
      

      create fts index:

      {
       "name": "default_index",
       "type": "fulltext-index",
       "params": {
        "doc_config": {
         "docid_prefix_delim": "",
         "docid_regexp": "",
         "mode": "type_field",
         "type_field": "type"
        },
        "mapping": {
         "default_analyzer": "standard",
         "default_datetime_parser": "dateTimeOptional",
         "default_field": "_all",
         "default_mapping": {
          "dynamic": true,
          "enabled": true
         },
         "default_type": "_default",
         "docvalues_dynamic": true,
         "index_dynamic": true,
         "store_dynamic": false,
         "type_field": "_type"
        },
        "store": {
         "indexType": "scorch",
         "mossStoreOptions": {},
         "segmentVersion": 15
        }
       },
       "sourceType": "gocbcore",
       "sourceName": "default",
       "sourceUUID": "323848032f89f5ee5a2ed490753bd46d",
       "sourceParams": {},
       "planParams": {
        "maxPartitionsPerPIndex": 1024,
        "indexPartitions": 1,
        "numReplicas": 0
       },
       "uuid": "7777ebf868450512"
      }
      

      Try to run the following queries:

      select meta().id from default where type='emp' and search(default,{"prefix": "em", "field":"type"})

      select meta().id from default where type='emp' and search(default, {"field": "type", "wildcard": "e?p"})
      

      They will fail with the following response:

      [
        {
          "code": 4000,
          "msg": "No index available on keyspace `default`:`default` that matches your query. Use CREATE PRIMARY INDEX ON `default`:`default` to create a primary index, or check that your expected index is online.",
          "query": "select meta().id from default where type='emp' and search(default, {\"prefix\": \"em\", \"field\": \"type\"})"
        }
      ]
      

      Last good build is 7.0.0-2168

      Attachments

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

        Activity

          People

            evgeny.makarenko Evgeny Makarenko (Inactive)
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty