ElasticSearch no query hits on long field type

I'm having a custom query plugin that aims at classifying documents as hit or not using a long field. The custom query has been implemented by extending the Lucene MultiTermQuery. Details may be found here.

When I execute the query using the mapping below, no documents are returned in spite of having the long field indexed and stored. By debugging the query I found that the Lucene query does not load the field, hence the FilteredTermsEnum used for classifying document as hit or not is not execute.

What am I doing it wrong?

{
  "images" : {
    "mappings" : {
      "descriptors" : {
        "properties" : {
          "content_id_db" : {
            "type" : "integer"
          },
          "image_descriptor_long" : {
            "type" : "long"
          },
          "image_descriptor_short" : {
            "type" : "long"
          },
          "image_id_db" : {
            "type" : "integer"
          },
          "url" : {
            "type" : "keyword"
          }
        }
      }
    }
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.