If I do a diacritic sensitive cts:query for cts:search in unfiltered mode then I get correct result but doing the same in filtered mode gives me incorrect results.
For example :
cts:search($data,($cts:query('unfiltered','diacritic-sensitive')))
returns incorrect results.
but :
cts:search($data,($cts:query('filtered','diacritic-sensitive')))
returns correct results.
So, is there any way to get correct results for unfiltered searches too?
Please find below my details of the code.
for $result in cts:search (fn:collection ($searchable-collection), $cts-query, ('unfiltered',     $relevance-score-algo), 0.0)
        order by xs:dateTime ($result//c:created-on) descending
        return $result/element()
Where the $cts-query is like this.
cts:element-query($element-to-query,
        cts:word-query($search-text,
        $search-options,
        $weight)
In options I can pass "diacritic-sensitive" or not.
                        
For accurate unfiltered diacritic-sensitive search, you must enable the
fast diacritic sensitive searchesindex. Allow reindexing and monitor the database status until it is complete.The docs have more on text indexing options and unfiltered search.