I'm searching in two separate indexes with two separate types at once.
In index1, I have a field 'work_email'.
In index2, I have a field 'email'.
I need to sort all results by email.
For this purpose I looked into using the 'index_name' property of ES, so
the 'work_email' field can be referenced as 'email' too.
On the other hand, in order to get proper the results in the proper order,
I must sort on non-analyzed values, which is why I upgraded my fields to
The problem is that there doesn't seem to be a way to reference the
work_email.raw field as email.raw.
You can see my recreation gist here:
I looked into using 'copy_to' as well, but couldn't figure out a way with
To sum up: How can I order on non-analyzed field, which is aliased?
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2b68a7af-cc9e-4e79-96f1-40aa9e71fc6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.