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

Mapping a field twice if one is a vector type prevents a return value when non-vector type is "stored"

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • No

    Description

      Given a field org_id a numeric array of one.  

      I want to index 

      • type=vector
      • dims=1
      • searchable as org_id

      and

      • type=number
      • searchable as org_id_val
      • store=true

      "org_id": {
      "enabled": true,
      "dynamic": false,
      "fields": [

      { "index": true, "name": "org_id_val", "store": true, "type": "number" }

      ,
      {
      "dims": 1,
      "index": true,
      "name": "org_id",
      "similarity": "l2_norm",
      "type": "vector",
      "vector_index_optimized_for": "recall"
      }
      ]
      }
      The problem is we suppress returning the vector (that's fine) but the other field searchable as I actually want to return it.

      When I run a query against this

      { "knn": [ \{ "k": 3, "field": "org_id", "vector": [ 0 ] }

      ],
      "fields": [ "*" ],
      "query": {
      "match_none": {}
      },
      "explain": true,
      "size": 10,
      "from": 0
      }
      I only get items like
      landmark_6075

      [3.4028234663852886e+38]

      content * Japanese restaurant with good quality fish although other ingredients such as miso seem to be instant varieties. Although not as good as your options in London, this is probably the best place in Cirencester for East Asian food.
      name * Soushi
      So when we run the query with I do not see org_id_val ** which is a type=number 

      If I run a query like

      { "knn": [ \{ "k": 3, "field": "org_id", "vector": [ 0 ] }

      ],
      "fields": [ "org_id_val" ],
      "query": {
      "match_none": {}
      },
      "explain": true,
      "size": 10,
      "from": 0
      }
      I only get the id and not org_id_val

      Attachments

        For Gerrit Dashboard: MB-62400
        # Subject Branch Project Status CR V

        Activity

          People

            sarthak.dua Sarthak Dua
            jon.strabala Jon Strabala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty