Use CURL to create mapping suspend


(李朋飞) #1

When I use curl to create mapping for index, curl will hang there, there will not be any corresponding, and will not stop operation.


elasticsearch version:5.6.3 or 5.6.2

os: ubuntu 16.04 and centos 7

This is not the case when I use version 5.3.3 ,please help me.

php script curl extension and post method . indices like is


  "settings": {
    "number_of_shards": 5,
    "number_of_replicas": 0,
    "analysis": {
      "analyzer": {
        "default": {
          "type": "custom",
          "tokenizer": "ik_max_word",
          "filter": [
            "stemmer"
          ]
        }
      }
    }
  },
  "data": {
    "mappings": {
      "folder": {
        "properties": {
          "id": {
            "type": "integer",
            "store": false
          },
          "name": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          },
          "type": {
            "type": "integer",
            "index": "no",
            "store": false
          },
          "owner": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          },
          "path": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          }
        }
      }
    }
  }
}

(David Pilato) #2

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

I edited your question.

I tried to ran it locally and it did not hang but failed:

DELETE test
PUT test
{
  "settings": {
    "number_of_shards": 5,
    "number_of_replicas": 0,
    "analysis": {
      "analyzer": {
        "default": {
          "type": "custom",
          "tokenizer": "ik_max_word",
          "filter": [
            "stemmer"
          ]
        }
      }
    }
  },
  "data": {
    "mappings": {
      "folder": {
        "properties": {
          "id": {
            "type": "integer",
            "store": false
          },
          "name": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          },
          "type": {
            "type": "integer",
            "index": "no",
            "store": false
          },
          "owner": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          },
          "path": {
            "type": "keyword",
            "index": "analyzed",
            "similarity": "BM25",
            "analyzer": "default",
            "search_analyzer": "default",
            "store": false
          }
        }
      }
    }
  }
}

Gives:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "Custom Analyzer [default] failed to find tokenizer under name [ik_max_word]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "Custom Analyzer [default] failed to find tokenizer under name [ik_max_word]"
  },
  "status": 400
}

(李朋飞) #3

Thanks your suggest, but you don't install plugin ik,so failed.


(李朋飞) #4

you can delete settings fields , it don't affect result.


(David Pilato) #5

You didn’t mention it I think.

@medcl.net can help hopefully


(李朋飞) #7

Yeah,it’s my fault.:sweat_smile:....


(Medcl) #8

I guess the issue was resolved.


(李朋飞) #9

I don’t think so,because the issue on github is my send and that there are still problems on the version 5.6.3


(李朋飞) #10

I said this question is a bug or I wrote a question, please give me a reply, thank you


(David Pilato) #11

Please read

Specifically the "be patient" part.


(Medcl) #12

@winlans can you try install this plugin again, ik plugin for es 5.6.3 was released just now.


(system) #13

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