I need to analyaze and tokenize the numeric fields like zip_codes, which
analyzer should I use??? currently I am using the standard analyzer, with
with i can not search the partial zip_codes,
Expected is if i search for '45', then it should return all the zip_codes
starting with 45, but its returning result if i enter the full zip_code and
returns only single record.
I need to analyaze and tokenize the numeric fields like zip_codes, which
analyzer should I use??? currently I am using the standard analyzer, with
with i can not search the partial zip_codes,
Expected is if i search for '45', then it should return all the zip_codes
starting with 45, but its returning result if i enter the full zip_code and
returns only single record.
If I understand the post correctly, the question is very specific to ZIP
codes. They are numeric in may countries, but search requirements are
usually very different (from a number). A zip code often has some semantic
(like the first digit determining the state).
This said, I believe have to take a very careful look at your requirements
and setup a special analyzer for the zip code field. By default, your field
is detected as numeric and no analyzing process is applied. You want to
change that and analyze as string with a special analyzer (depending on
your requirements). I would look at an egde-ngram analyzer for starters.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.