Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pattern_capture token filter does not throw error with patterns missing. #3808

Closed
jtreher opened this Issue Sep 30, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@jtreher
Copy link

jtreher commented Sep 30, 2013

Just a simple note. When creating a custom_filter, the pattern_capture token filter does not throw an error with patterns missing. Instead, it must default to some behavior. I had mistakenly used "pattern" with a single string rather than "patterns" with an array.

https://gist.github.com/jtreher/6766911

{
"settings": {
"default" : {},
"analysis": {
"filter": {
"sample":{
"type":"pattern_capture",
"pattern":"(([a-z]+)(\d*))"

            }
        }
    }
}

}

@ghost ghost assigned s1monw Sep 30, 2013

@s1monw

This comment has been minimized.

Copy link
Contributor

s1monw commented Sep 30, 2013

good call - I will push a fix and throw an ESIllegalArgumentException :)

@s1monw s1monw closed this in 20423a4 Sep 30, 2013

s1monw added a commit that referenced this issue Sep 30, 2013

Throw ESIA if required field 'patterns' is not present in filter config.
If 'pattern_capture' tokenfilter is create / mapped without a 'patterns'
settings we now throw an exception since this is a misconfiguration and
likely due to the similar settings on related token filters.

Closes #3808

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Throw ESIA if required field 'patterns' is not present in filter config.
If 'pattern_capture' tokenfilter is create / mapped without a 'patterns'
settings we now throw an exception since this is a misconfiguration and
likely due to the similar settings on related token filters.

Closes elastic#3808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.