Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-11013

Selecting a single field in a query returns wrong "total_count" for non-indexed fields and fields with Store.NO

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Adding a field selector to the query returns the wrong "total_count" in the result:

      ➜  openshift oc -n enmasse-infra rsh infinispan-0 curl 'http://app:test12@infinispan-0:11222/rest/v2/caches/devices?action=search&query=from+io.enmasse.iot.registry.infinispan.data.DeviceInformation+d&max_results=1' 
      {
        "total_results" : 38847,
        "hits" : [ {
          "hit" : {
            "_type" : "io.enmasse.iot.registry.infinispan.data.DeviceInformation",
            "tenantId" : "jbtest.iot/2019-11-29T08:52:39Z",
            "deviceId" : "http-inserter-wh5xn103",
            "version" : "992899e8-c557-4a2c-8bc0-db950a803898",
            "registrationInformation" : "{}",
            "credentials" : [ {
              "authId" : "device-103",
              "type" : "hashed-password",
              "secrets" : [ "{\"hash-function\":\"bcrypt\",\"pwd-hash\":\"$2y$12$JELemetlJuc.6ZgQkCn5X..7UEPQm5iQV23lgno7/2sEKY2i.mPmS\"}" ]
            } ]
          }
        } ]
      }
      
      ➜  openshift oc -n enmasse-infra rsh infinispan-0 curl 'http://app:test12@infinispan-0:11222/rest/v2/caches/devices?action=search&query=select+d.deviceId+from+io.enmasse.iot.registry.infinispan.data.DeviceInformation+d&max_results=1'
      {
        "total_results" : 1,
        "hits" : [ {
          "hit" : {
            "deviceId" : "http-inserter-wh5xn103"
          }
        } ]
      }
      

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              jreimann-2 Jens Reimann
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: