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

IP queries that do a point look up are not matching content within an array

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • 7.2.0
    • 7.2.0
    • fts
    • None
    • Untriaged
    • 0
    • Unknown

    Description

      RANGE QUERY SCENARIO :
      If I we have a doc which has IPs in form of an array like: 
      "ip":["192.168.0.0", "192.168.5.0", "192.168.10.0", "192.168.255.255"]
       
      Now, If run a range IP query

      {"field": "ip", "cidr": "192.168.0.0/16"

      It returns me the full doc as all IPs are within the desired range, even doc containing array value are also returned as expected!

      This is because, the query would still return the doc as a hit because there is at least 1 IP token for the field that qualifies.


      EXACT MATCH SCENARIO (BUGGY)
       
      Now instead of range queries, and instead talking about direct/match queries.. Queries like:

      {"field": "ip", "cidr": "172.16.0.0"}

      Only those docs are getting returned which have a direct match,  doc containing array value are NOT returned.
      We aren't going the same way with exact match as we are going in range queries. 

       

      Demo : 

      IP 172.16.0.0 present as an array of IP as well as an individual IP.

       
      On querying the IP, we only get the docs which have an individual IP as doc value, IP present in arrays are not returned ( doc ip_52, ip_53) are not returned!

      Attachments

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

        Activity

          People

            sarthak.dua Sarthak Dua
            sarthak.dua Sarthak Dua
            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