US mobile phone number data can be saved in multiple formats like (XXX) XXX-XXXX OR +1 (XXX) XXX-XXXX OR XXX-XXX-XXXX OR +1 XXX-XXX-XXXX OR XXXXXXXXXX.
How to ensure which DataType(OOB) would be ideal to be used or any analyser already available to support all above format to return result in search query?
There is no type that automatically handle this but you might be able to use a keyword field with a normal user that removes all non-numeric characters from the indexed token. This does however not handle the case where country code is or is not present, so that may require some normalisation before you index your data. If I you need to support international numbers as well you will most certainly need to normalise the field in your application ahead of indexing as international numbers can have varying lengths and formats.
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.