Couchbase FTS sorting with keyword analyzer case insensitive

I create a FTS in Couchbase 6.5.0
I can sort my query result by the field: name
I create the index with keyword analyzer, but this order is case sensitive, is there any way I can sort it case insensitive?
I tried to create a custom analyzer like this:


But it does not work if I sort by the index filed with this customize analyzer.

This should be easy to config it, but I cannot find it, so crazy!

@Fujing ,

The above custom analyzer should work for your case.
Can you please share your sample query, document, and index definition here?

Make sure you are setting the right analyzer in the index definition for the field under focus.

Cheers!

Hi
This is the index and analyzer:


This looks right, but it’d do good to share your entire index definition in its JSON format.
Would you also share your FTS query along with it.

I see you’re setting the field “Searchable as” - namesortby. Are you using namesortby as the field to search and sort in the query?