I am using an Elasticsearch index to process meta data about sets of
documents, but want to use the same index for regular search in production
( as it is a very large index ).
I want to search for State Name Abreviations, but to get accurate data, I
need to look for a pattern.
I could search for a comma, followed by a space, followed by the
abbreviation ( eg. ", CA" ), but then I have to set up whitespace and comma
tokenizers on every document field in my index. This seems like it will
grow my index considerably, which will decrease performance
in production where the bulk of access to this index happens.
How would I search for a five character string of numbers? Could I do this
without setting up custom tokenizing or analyzing? Then I could search for
the pattern "CA #####".