[SOLVED] Analyze

Hi all,

I try to analyze a string with a curl request:

curl -XGET 'localhost:9200/_analyze?pretty=true' -d '
    "tokenizer" : "standard",
    "filters" : ["pattern_capture"],
    "text" : [ "This is a test 2016" ],
    "explain" : true

I want to apply the token filter "pattern_ capture", but I don't know how to add the pattern with this kind of request.

How I can do to add the pattern ?

Thanks in advance.

I think you cannot parametrize filters inside the _analyze request body. Instead, add the pattern capture token filter under a specific name to your index like described here and then refer to that name in the _analzye request.

Thanks for your reply !