How to sort query results by combining multiple fields(as single field)?
Hi Everyone,
We have a use case where we need to sort a result by different fields. E.g. In an existing system we have fields named as countryLang or lang or language in different components, we are introducing some enhancements by giving search and sort option to the system. All these fields have same set of data only, we need to sort the result set by considering all these fields of the components. Is there any way to provide a single alias name in Lucene index and query so that all these fields are considered as same? please let me know if there is any other approach to tackle the problem. It is an existing system with huge content so changing field name is not an option.
E.g
Comp 1 countryLang - en_US
Comp 2 countryLang - fr_FR
Comp 3 lang - en_US
Comp 4 language - de_DE
Expected sort order:
Comp 4 language - de_DE
Comp 1 countryLang - en_US
Comp 3 lang - en_US
Comp 2 countryLang - fr_FR