Split fields and reindex?

(Tushar Chevulkar) #1

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

(Mark Walkom) #2

You need to reindex and have a first and last name field.

(Tushar Chevulkar) #3

is there a way that i can split the existing field and re-index in elastic search without using any external script?

(Christoph) #4

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.

(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.