Doc values for lowercase string in ES 2.4

Hi All,

We have been using ES 1.4.2 and we are in the process of migrating to 2.4.4. We have the following mappings for all the string fields

  "analysis": {
    "analyzer": {
      "op_analyzer": {
        "filter": [
          "lowercase"
        ],
        "tokenizer": "keyword"
      }
    }
  }

 "title": {
      "index": "not_analyzed",
      "type": "string",
      "fields": {
        "lc": {
          "analyzer": "op_analyzer",  // See, above
          "type": "string"
        },
        "stopwordanalyzed": {
          "analyzer": "stop",
          "type": "string"
        },
        "snowballanalyzed": {
          "analyzer": "snowball",
          "type": "string"
        }
      }
    }

If we carry forward the same mapping, I realize that we will not be able to take advantage of doc values on 'title.lc' field during aggregations. What is the best way to achieve doc value support for lowercase values?

Any help is really appreciated

Thanks in advance
Ashok

Ashok, you need to lowercase your "title" before indexing it. Applying any analysis makes the field ineligible for doc_values

Thanks for the reply Mik. To avoid impact on client code, is there a way to force ES to populate lowercase values during indexing via transformation or some other mechanism on 'title.lc' (Note that, 'lc' is one of the multi fields in 'title')

Since we are going to re-index the data, i have flexibility in changing the mappings

Not that I know of, in 2.x

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