How to define mapping for sortable fields


#1

I use ES 5.2.2.
I my document I have some fields used only for sorting. I was not able to find if that is proper mapping.

PUT sorting/_mapping/doc
{
  "properties": {
    "name": { - sortable, not searchable
      "type": "keyword"
    },
    "note": {
      "properties": {
        "author": { - sortable, not searchable
          "properties": {
            "name": {
              "type": "keyword"
            }
          }
        },
        "content": {  - not sortable, not searchable
          "index": false,
          "type": "text" - why I need to define type when it is not indexed?
        }
      }
    }
  }
}

(system) #2

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