I have a mapping in which i have a following field
> "full_name": {
> "type": "text"
> }
which has 500,000 entries in it. Now the problem is i need to run a DISTINCT query on only first name. Can anyone tell me how i write the query. or do I need to re-index the data if yes how do i split the full_name to first_name and last name and re-index it
There is no way to do this automatically, sorry. Also, even splitting while reindexing will be tricky for your full_name use case. From my own experience I can tell you that determining "first name" parts in person names can be a real challenge. Depending on the kind of names (cultural context) you might get away with some heuristics though, but this largely depends on your data.
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.