Using tokenizer on rank_feature fields

Hi! I was wondering if it's possible to apply tokenizer/analyzers to rank_feature fields. When attempting to create a sample index on ES 7.6.2 it doesn't appear to work, but I don't see anything explicit in the docs.

Index creation:

    curl -X PUT \ \
      -H 'Cache-Control: no-cache' \
      -H 'Content-Type: application/json' \
      -H 'cache-control: no-cache' \
      -d '{
        "mappings": {
            "properties": {
                "topics": {
                    "type": "rank_features",
                    "analyzer": "path_analyzers"
        "settings": {
            "analysis": {
                "analyzer": {
                    "path_analyzer": {
                        "tokenizer": "path_hierarchy"


        "error": {
            "root_cause": [
                    "type": "mapper_parsing_exception",
                    "reason": "Mapping definition for [topics] has unsupported parameters:  [analyzer : path_analyzers]"
            "type": "mapper_parsing_exception",
            "reason": "Failed to parse mapping [_doc]: Mapping definition for [topics] has unsupported parameters:  [analyzer : path_analyzers]",
            "caused_by": {
                "type": "mapper_parsing_exception",
                "reason": "Mapping definition for [topics] has unsupported parameters:  [analyzer : path_analyzers]"
        "status": 400

Version info:

    > elasticsearch -version
    Version: 7.6.2-SNAPSHOT
    Build: oss/tar/unknown/2020-06-09T10:44:47.280460Z
    JVM: 14.0.1

    > java -version
    openjdk version "1.8.0_222"
    OpenJDK Runtime Environment Corretto- (build 1.8.0_222-b10)
    OpenJDK 64-Bit Server VM Corretto- (build 25.222-b10, mixed mode)

    # OS 
    > sw_vers
    ProductName: Mac OS X
    ProductVersion: 10.14.4
    BuildVersion: 18E226

No, it is not possible to use analyzer or normalizer for rank_features data types.
This field assumes that its features already come as analyzed/normalized terms. It then will index these terms into a rank_features field (in our case, it is "topics") with provided frequencies.

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