# \[SOLVED\] Analyze

**URL:** <https://discuss.elastic.co/t/solved-analyze/48560>\
**Category:** Elasticsearch\
**Created:** [April 27, 2016, 2:02pm UTC](https://discuss.elastic.co/t/solved-analyze/48560 "2016-04-27T14:02:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [April 27, 2016, 2:02pm UTC](https://discuss.elastic.co/t/solved-analyze/48560/1 "2016-04-27T14:02:13Z")

</div>

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.  
Alexandre

---

<div class="post-metadata">

**Author:** ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)\
**Post date:** [April 27, 2016, 2:50pm UTC](https://discuss.elastic.co/t/solved-analyze/48560/2 "2016-04-27T14:50:03Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-capture-tokenfilter.html) and then refer to that name in the `_analzye` request.

---

<div class="post-metadata">

**Author:** ![axelfelix](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@axelfelix](https://discuss.elastic.co/u/axelfelix)\
**Post date:** [April 27, 2016, 3:03pm UTC](https://discuss.elastic.co/t/solved-analyze/48560/3 "2016-04-27T15:03:26Z")

</div>

Thanks for your reply !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:55pm UTC](https://discuss.elastic.co/t/solved-analyze/48560/4 "2017-07-05T22:55:55Z")

</div>

Closed on July 5, 2017, 10:55pm UTC


