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

[BP to 7.1.1 of MB-47512] GSI - With Collection Indexer should index leading MISSING entries

    XMLWordPrintable

Details

    Description

      indexer service will not index the document when leading index key is MISSING.
      Index selection must be made such that when queries can give right results. Otherwise index must not be chosen.
      So index to qualify, the leading index key must be part of the predicate or user must explicitly give leadingkey IS NOT MISSING.

      Example:

      INSERT INTO default VALUES("k01",{"a":1});
      CREATE INDEX ix1 ON default(b);   -- index will not have document "k01"
      SELECT d.* FROM default AS d;  -- query will not choose index ix1. By choosing ix1 document "k01" will not return user (that result in wrong result)
      

      By adding MISSING attribute on leading indexing key and indexer indexes MISSING like below. Any query on the default can use ix2. SLA specific queries can create there own targeted indexes.

      CREATE INDEX ix2 ON default(b MISSING);

      Attachments

        Issue Links

          Activity

            People

              pavan.pb Pavan PB
              sai.teja Sai Krishna Teja
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty