Sorting Results Case Insensitive With Lucene
(Doc ID 1637544.1)
Last updated on OCTOBER 09, 2020
Applies to:Oracle WebCenter Sites - Version 220.127.116.11.1 and later
Information in this document applies to any platform.
We have enabled a Lucene asset type index. We want to search assets and sort results by an attribute called "title". To sort results, "title" cannot be tokenized, because sorting is not granted in tokenized fields. If we use Luke tool to inspect the index, "title" values are indexed case sensitive, so sorting is not working as desired.
What we get:
1. This "Tiger"
2. This Place
3. This is a dog
4. This is a table
What we wish:
1. This is a dog
2. This is a table
3. This Place
4. This "Tiger"
We have consulted the Java API and we have not found a method to set case insensitive sorting. We have configured an analyzer which transform tokens to lower case and can remove special characters, but an analyzer is only called for tokenized attributes. So, how can we index the attributes that are not tokenized transforming them to lower case and ignoring special characters like quotes (")? Is there a configuration to get it?
A database column IndexSourceMetaDataConfig.sortable exists, can this be used to implement sorting?
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document