0
votes

The mapping of the elasticsearch index has a custom analyzer attached to it. How to read the definition of the custom analyzer.

http://localhost:9200/test_namespace/test_namespace/_mapping

"matchingCriteria": { "type": "string", "analyzer": "custom_analyzer", "include_in_all": false }

my search is not working with the analyzer thats why i need to know what exactly this analyzer is doing.

the doc explains how to modify an analyzer or attach a new analyzer to an existing index but i didnt find a way to see what an analyzer does.

1

1 Answers

1
votes

use the _settings API:

curl -XGET 'http://localhost:9200/test_namespace/_settings?pretty=true' 

it should generate a response similar to:

{
  "test_namespace" : {
    "settings" : {
      "index" : {
        "creation_date" : "1418990814430",
        "routing" : {
          "allocation" : {
            "disable_allocation" : "false"
          }
        },
        "uuid" : "FmX9NrSNSTO2bQM5pd-iQQ",
        "number_of_replicas" : "2",
        "analysis" : {
          "analyzer" : {
            "edi_analyzer" : {
              "type" : "custom",
              "char_filter" : [ "my_pattern" ],
              "filter" : [ "lowercase", "length" ],
              "tokenizer" : "whitespace"
            },
            "xml_analyzer" : {
              "type" : "custom",
              "char_filter" : [ "html_strip" ],
              "filter" : [ "lowercase", "length" ],
              "tokenizer" : "whitespace"
            },
...