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

Index Creation time META().xxx is not working in array collection

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.1.0, 5.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      INSERT INTO default VALUES("k01",{"id":1 , "o1" : {"ch":["a","b"] }});
      CREATE INDEX ix20 ON default( ARRAY META().id FOR v IN o1.ch END);  
      Above index has no entries in array
      [] is indexed instead of ["k01,"k01"]
      CREATE INDEX ix21 ON default( DISTINCT ARRAY META().id FOR v IN o1.ch END);  
      SELECT META().id FROM default WHERE ANY v IN o1.ch SATISFIES meta().id = "k01" END;
      Should  use ix21 and return "k0"
      

      CREATE INDEX ix20 ON default( ARRAY id FOR v IN o1.ch END);  
      indexes [1,1]
      

      Demonstrate just used scalar array. The problem will be with array index too

      Attachments

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

        Activity

          People

            ajay.bhullar Ajay Bhullar
            Sitaram.Vemulapalli Sitaram Vemulapalli
            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