# Error on Pattern Capture token filter

**URL:** <https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163>\
**Category:** Elasticsearch\
**Created:** [August 10, 2013, 7:47pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163 "2013-08-10T19:47:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faillissements\_Dossi](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Faillissements\_Dossi](https://discuss.elastic.co/u/Faillissements_Dossi)\
**Post date:** [August 10, 2013, 7:47pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/1 "2013-08-10T19:47:59Z")

</div>

Hi,

I got an error on the Pattern Capture token filter.

I try to set the analyzer with the code: (using Head)

XPUT [http://localhost:9200/index/\_settings](http://localhost:9200/index/_settings)

{  
"analysis": {  
"filter": {  
"artikel": {  
"type": "pattern\_capture",  
"patterns": [  
"(art\. |artikel |artikelen |op( de|) voet van )(.+?)( BW| van  
het Burgerlijk Wetboek| Rv| van het Wetboek van Burgerlijke  
Rechtsvordering)"  
]  
}  
},  
"analyzer": {  
"artikel": {  
"tokenizer": "pattern"  
}  
}  
}  
}

After opening the index again, I got a error in the logs:

Caused by: java.lang.ClassNotFoundException:  
org.elasticsearch.index.analysis.patterncapture.PatternCaptureTokenFilterFactory  
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)  
at java.security.AccessController.doPrivileged(Native Method)  
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)  
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)  
at  
org.elasticsearch.common.settings.ImmutableSettings.loadClass(ImmutableSettings.java:346)  
... 17 more

I use ES 0.90.1

Please advice.

Thanks, Marcel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Faillissements\_Dossi](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Faillissements\_Dossi](https://discuss.elastic.co/u/Faillissements_Dossi)\
**Post date:** [August 10, 2013, 8:58pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/2 "2013-08-10T20:58:44Z")

</div>

Op zaterdag 10 augustus 2013 21:47:59 UTC+2 schreef Faillissements Dossier:

> Hi,
> 
> I got an error on the Pattern Capture token filter.
> 
> I try to set the analyzer with the code: (using Head)
> 
> XPUT [http://localhost:9200/index/\_settings](http://localhost:9200/index/_settings)
> 
> {  
> "analysis": {  
> "filter": {  
> "artikel": {  
> "type": "pattern\_capture",  
> "patterns": [  
> "(art\. |artikel |artikelen |op( de|) voet van )(.+?)( BW| van  
> het Burgerlijk Wetboek| Rv| van het Wetboek van Burgerlijke  
> Rechtsvordering)"  
> ]  
> }  
> },  
> "analyzer": {  
> "artikel": {  
> "tokenizer": "pattern"  
> }  
> }  
> }  
> }
> 
> After opening the index again, I got a error in the logs:

org.elasticsearch.indices.IndexCreationException: [recht] failed to create  
index  
at  
org.elasticsearch.indices.InternalIndicesService.createIndex(Internal  
IndicesService.java:382)  
at  
org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:296)  
at  
org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:162)  
at  
org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:321)  
at  
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecu

tor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:95)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
java:1146)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor  
.java:615)  
at java.lang.Thread.run(Thread.java:679)  
Caused by: org.elasticsearch.ElasticSearchIllegalArgumentException: failed  
to find token filter type [pattern\_capture] for [artikel]  
at  
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:249)  
at  
org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)  
at  
org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)  
at  
org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)  
at  
org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)  
at  
org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)  
at  
org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)  
at  
org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)  
at  
org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:380)  
... 7 more  
Caused by: org.elasticsearch.common.settings.NoClassSettingsException:  
Failed to load class setting [type] with value [pattern\_capture]  
at  
org.elasticsearch.common.settings.ImmutableSettings.loadClass(ImmutableSettings.java:348)  
at  
org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:336)  
at  
org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:239)  
... 15 more

> Caused by: java.lang.ClassNotFoundException:  
> org.elasticsearch.index.analysis.patterncapture.PatternCaptureTokenFilterFactory  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:217)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.net.URLClassLoader.findClass(URLClassLoader.java:205)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:321)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:266)  
> at  
> org.elasticsearch.common.settings.ImmutableSettings.loadClass(ImmutableSettings.java:346)  
> ... 17 more
> 
> I use ES 0.90.1
> 
> Please advice.
> 
> Thanks, Marcel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [August 10, 2013, 11:12pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/3 "2013-08-10T23:12:05Z")

</div>

Although the issue says that featured was released with version 0.90.0, I  
don't think it was released until version 0.90.3.

--  
Ivan

On Sat, Aug 10, 2013 at 1:58 PM, Faillissements Dossier \<ronald@binqmedia.nl

> wrote:

> Op zaterdag 10 augustus 2013 21:47:59 UTC+2 schreef Faillissements Dossier:
> 
> > Hi,
> > 
> > I got an error on the Pattern Capture token filter.
> > 
> > I try to set the analyzer with the code: (using Head)
> > 
> > XPUT [http://localhost:9200/index/\_\*\*settings](http://localhost:9200/index/_**settings)[http://localhost:9200/index/\_settings](http://localhost:9200/index/_settings)
> > 
> > {  
> > "analysis": {  
> > "filter": {  
> > "artikel": {  
> > "type": "pattern\_capture",  
> > "patterns": [  
> > "(art\. |artikel |artikelen |op( de|) voet van )(.+?)( BW| van  
> > het Burgerlijk Wetboek| Rv| van het Wetboek van Burgerlijke  
> > Rechtsvordering)"  
> > ]  
> > }  
> > },  
> > "analyzer": {  
> > "artikel": {  
> > "tokenizer": "pattern"  
> > }  
> > }  
> > }  
> > }
> > 
> > After opening the index again, I got a error in the logs:
> 
> org.elasticsearch.indices.IndexCreationException: [recht] failed to  
> create index  
> at  
> org.elasticsearch.indices.InternalIndicesService.createIndex(Internal  
> IndicesService.java:382)  
> at  
> org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:296)  
> at  
> org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:162)  
> at  
> org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:321)  
> at  
> org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecu
> 
> tor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:95)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
> java:1146)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor  
> .java:615)  
> at java.lang.Thread.run(Thread.java:679)  
> Caused by: org.elasticsearch.ElasticSearchIllegalArgumentException: failed  
> to find token filter type [pattern\_capture] for [artikel]  
> at  
> org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:249)  
> at  
> org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)  
> at  
> org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)  
> at  
> org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)  
> at  
> org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)  
> at  
> org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)  
> at  
> org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)  
> at  
> org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)  
> at  
> org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:380)  
> ... 7 more  
> Caused by: org.elasticsearch.common.settings.NoClassSettingsException:  
> Failed to load class setting [type] with value [pattern\_capture]  
> at  
> org.elasticsearch.common.settings.ImmutableSettings.loadClass(ImmutableSettings.java:348)  
> at  
> org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:336)  
> at  
> org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:239)  
> ... 15 more
> 
> > Caused by: java.lang. **ClassNotFoundException: org.elasticsearch.index.**  
> > analysis.patterncapture. **PatternCaptureTokenFilterFacto** ry  
> > at java.net.URLClassLoader$1.run(\*\*URLClassLoader.java:217)  
> > at java.security.\*\*AccessController.doPrivileged(\*\*Native Method)  
> > at java.net.URLClassLoader.\*\*findClass(URLClassLoader.java:\*\*205)  
> > at java.lang.ClassLoader.\*\*loadClass(ClassLoader.java:\*\*321)  
> > at sun.misc.Launcher$**AppClassLoader.loadClass(**  
> > Launcher.java:294)  
> > at java.lang.ClassLoader.\*\*loadClass(ClassLoader.java:\*\*266)  
> > at org.elasticsearch.common. **settings.ImmutableSettings.**  
> > loadClass(ImmutableSettings.\*\*java:346)  
> > ... 17 more
> > 
> > I use ES 0.90.1
> > 
> > Please advice.
> > 
> > Thanks, Marcel
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [August 11, 2013, 7:04am UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/4 "2013-08-11T07:04:52Z")

</div>

On Sunday, August 11, 2013 1:12:05 AM UTC+2, Ivan Brusic wrote:

> Although the issue says that featured was released with version 0.90.0, I  
> don't think it was released until version 0.90.3.

this is correct, I fixed the label on the issue:

> <https://github.com/elastic/elasticsearch/issues/3340>
>
> The \`pattern\_capture\` token filter, unlike the \`pattern\` tokenizer, emits a toke…n for every capture group in the regular expression. Patterns are not anchored to the beginning and end of the string, so each pattern can match multiple times, and matches are allowed to overlap.
> 
> For instance a pattern like :
> 
> \`\`\`
> "((\[a-z\]+)(\\d\*))"
> \`\`\`
> 
> when matched against: 
> 
> \`\`\`
> "abc123def456"
> \`\`\`
> 
> would produce the tokens: \[\`abc123\`, \`abc\`, \`123\`, \`def456\`, \`def\`, \`456\` \]
> 
> If \`preserve\_original\` is set to \`true\` then it would also emit the original token: \`abc123def456\`.
> 
> This is particularly useful for indexing text like camel-case code, eg \`stripHTML\` where a user may search for \`"strip html"\` or \`"striphtml"\`:
> 
> \`\`\`
> curl -XPUT localhost:9200/test/ -d '
> {
> "settings" : {
> "analysis" : {
> "filter" : {
> "code" : {
> "type" : "pattern\_capture",
> "preserve\_original" : 1,
> "patterns" : \[
> "(\\\\p{Ll}+|\\\\p{Lu}\\\\p{Ll}+|\\\\p{Lu}+)",
> "(\\\\d+)"
> \]
> }
> },
> "analyzer" : {
> "code" : {
> "tokenizer" : "pattern",
> "filter" : \["code", "lowercase" \]
> }
> }
> }
> }
> }
> '
> \`\`\`
> 
> When used to analyze the text \`"import static org.apache.commons.lang.StringEscapeUtils.escapeHtml"\`, this emits the tokens: \[\`import\`, \`static\`, \`org\`, \`apache\`, \`commons\`, \`lang\`, \`stringescapeutils\`, \`string\`, \`escape\`, \`utils\`, \`escapehtml\`, \`escape\`, \`html\` \]
> 
> Another example is analyzing email addresses:
> 
> \`\`\`
> curl -XPUT localhost:9200/test/ -d '
> {
> "settings" : {
> "analysis" : {
> "filter" : {
> "email" : {
> "type" : "pattern\_capture",
> "preserve\_original" : 1,
> "patterns" : \[
> "(\\\\w+)",
> "(\\\\p{L}+)",
> "(\\\\d+)",
> "@(.+)"
> \]
> }
> },
> "analyzer" : {
> "email" : {
> "tokenizer" : "uax\_url\_email",
> "filter" : \["email", "lowercase", "unique" \]
> }
> }
> }
> }
> }
> '
> \`\`\`
> 
> When the above analyzer is used on an email address like \`john-smith\_123@foo-bar.com\` it would produce the following tokens: \[\`john-smith\_123@foo-bar.com\`, \`john\`, \`smith\_123\`, \`smith\`, \`123\`, \`foo\`, \`foo-bar.com\`, \`bar\`, \`com\`\]
> 
> Multiple patterns are required to allow overlapping captures, but also means that patterns are less dense and easier to understand.
> 
> Note: All tokens are emitted in the same position, and with the same character offsets, so when combined with highlighting, the whole original token will be highlighted, not just the matching subset. For instance, querying the above email address for \`"smith"\` would highlight \`"\<em\>john-smith\_123@foo-bar.com\</em\>"\`, not \`"john-\<em\>smith\</em\>\_123@foo-bar.com"\`

simon

> --  
> Ivan
> 
> On Sat, Aug 10, 2013 at 1:58 PM, Faillissements Dossier \<  
> ron...@binqmedia.nl \<javascript:\>\> wrote:
> 
> > Op zaterdag 10 augustus 2013 21:47:59 UTC+2 schreef Faillissements  
> > Dossier:
> > 
> > > Hi,
> > > 
> > > I got an error on the Pattern Capture token filter.
> > > 
> > > I try to set the analyzer with the code: (using Head)
> > > 
> > > XPUT [http://localhost:9200/index/\_\*\*settings](http://localhost:9200/index/_**settings)[http://localhost:9200/index/\_settings](http://localhost:9200/index/_settings)
> > > 
> > > {  
> > > "analysis": {  
> > > "filter": {  
> > > "artikel": {  
> > > "type": "pattern\_capture",  
> > > "patterns": [  
> > > "(art\. |artikel |artikelen |op( de|) voet van )(.+?)( BW|  
> > > van het Burgerlijk Wetboek| Rv| van het Wetboek van Burgerlijke  
> > > Rechtsvordering)"  
> > > ]  
> > > }  
> > > },  
> > > "analyzer": {  
> > > "artikel": {  
> > > "tokenizer": "pattern"  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > After opening the index again, I got a error in the logs:
> > 
> > org.elasticsearch.indices.IndexCreationException: [recht] failed to  
> > create index  
> > at  
> > org.elasticsearch.indices.InternalIndicesService.createIndex(Internal  
> > IndicesService.java:382)  
> > at  
> > org.elasticsearch.indices.cluster.IndicesClusterStateService.applyNewIndices(IndicesClusterStateService.java:296)  
> > at  
> > org.elasticsearch.indices.cluster.IndicesClusterStateService.clusterChanged(IndicesClusterStateService.java:162)  
> > at  
> > org.elasticsearch.cluster.service.InternalClusterService$2.run(InternalClusterService.java:321)  
> > at  
> > org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecu
> > 
> > tor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:95)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.  
> > java:1146)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor  
> > .java:615)  
> > at java.lang.Thread.run(Thread.java:679)  
> > Caused by: org.elasticsearch.ElasticSearchIllegalArgumentException:  
> > failed to find token filter type [pattern\_capture] for [artikel]  
> > at  
> > org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:249)  
> > at  
> > org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)  
> > at  
> > org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:201)  
> > at  
> > org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:82)  
> > at  
> > org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)  
> > at  
> > org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)  
> > at  
> > org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:129)  
> > at  
> > org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:66)  
> > at  
> > org.elasticsearch.indices.InternalIndicesService.createIndex(InternalIndicesService.java:380)  
> > ... 7 more  
> > Caused by: org.elasticsearch.common.settings.NoClassSettingsException:  
> > Failed to load class setting [type] with value [pattern\_capture]  
> > at  
> > org.elasticsearch.common.settings.ImmutableSettings.loadClass(ImmutableSettings.java:348)  
> > at  
> > org.elasticsearch.common.settings.ImmutableSettings.getAsClass(ImmutableSettings.java:336)  
> > at  
> > org.elasticsearch.index.analysis.AnalysisModule.configure(AnalysisModule.java:239)  
> > ... 15 more
> > 
> > > Caused by: java.lang.\*_ClassNotFoundException: org.elasticsearch.index._  
> > > \*analysis.patterncapture. **PatternCaptureTokenFilterFacto** ry  
> > > at java.net.URLClassLoader$1.run(\*\*URLClassLoader.java:217)  
> > > at java.security.\*\*AccessController.doPrivileged(\*\*Native  
> > > Method)  
> > > at java.net.URLClassLoader.**findClass(URLClassLoader.java:**  
> > > 205)  
> > > at java.lang.ClassLoader.\*\*loadClass(ClassLoader.java:\*\*321)  
> > > at sun.misc.Launcher$**AppClassLoader.loadClass(**  
> > > Launcher.java:294)  
> > > at java.lang.ClassLoader.\*\*loadClass(ClassLoader.java:\*\*266)  
> > > at org.elasticsearch.common. **settings.ImmutableSettings.**  
> > > loadClass(ImmutableSettings.\*\*java:346)  
> > > ... 17 more
> > > 
> > > I use ES 0.90.1
> > > 
> > > Please advice.
> > > 
> > > Thanks, Marcel
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Faillissements\_Dossi](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Faillissements\_Dossi](https://discuss.elastic.co/u/Faillissements_Dossi)\
**Post date:** [August 11, 2013, 12:13pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/5 "2013-08-11T12:13:02Z")

</div>

Thanks.

How do I upgrade from 0.90.1 to 0.90.3 and keep the data?

Marcel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Faillissements\_Dossi](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@Faillissements\_Dossi](https://discuss.elastic.co/u/Faillissements_Dossi)\
**Post date:** [August 11, 2013, 9:03pm UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/6 "2013-08-11T21:03:20Z")

</div>

I upgraded to 0.90.3 and pattern\_capture works.

But now I'm confused how it works.

I have a text like:

\*taansprakelijk zijn uit hoofde van bestuurdersaansprakelijkheid ex artikel  
2:248 BW en hoofdelijke veroordeling van [geintimeerde sub 1.] c.s. tot  
betaling van..... de verplichtingen uit artikel 2:10 BW en dat de  
bestuurders \*

I only want to capture "artikel 2:248 BW" and "artikel 2:10 BW"

Using the json below doesn't give this back. When I test the analyzer with  
Inquisitor I get all the individual words and not the phrases I need.

{  
"analysis": {  
"filter": {  
"artikel": {  
"type": "pattern\_capture",  
"preserve\_original": 1,  
"patterns": [  
"(artikel .+? BW)",  
"(.:...)"  
]  
}  
},  
"analyzer": {  
"artikel": {  
"tokenizer": "pattern",  
"filter": [  
"artikel",  
"lowercase"  
]  
}  
}  
}  
}

Please advice  
Marcel

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:21am UTC](https://discuss.elastic.co/t/error-on-pattern-capture-token-filter/13163/7 "2017-07-06T02:21:41Z")

</div>


