IgnoreAccents(false) with FTS not working

Using this code…


using (var entry = new MutableDocument("1"))
{
    entry.SetString("content", "hâkimler");
    Database.Save(entry);
}
using (var entry = new MutableDocument("2"))
{
    entry.SetString("content", "hakimler");
    Database.Save(entry);
}
var index = IndexBuilder
    .FullTextIndex(FullTextIndexItem.Property("content"))
    .SetLanguage(null)
    .IgnoreAccents(false);

Database.CreateIndex("ftsidx", index);

var whereClause = FullTextExpression
    .Index("ftsidx")
    .Match("'hâkimler'");

return QueryBuilder
    .Select(SelectResult.All())
    .From(DataSource.Database(Database))
    .Where(whereClause)
    .Execute();

I would expect this to return only one result since it should respect the accent over the â, but it returns both. I have tried this on the iOS (.NET) support version as well as the NetDesktop support version.

I also get the same result with other accents such as when comparing ayudo with ayudó. I have tried setting the locale in SetLanguage with no effect (I don’t really want to set the language locale anyway because the text may be multilanguage).

Am I missing something? Any help would be appreciated…

interesting. The language affects stemming but that’s it. Accents should be handled at the index level so this may be a bug somewhere when determining what an accent is or perhaps it’s formatted in such a way that it is not recognized as an accent. I’d say file a bug on the repo so that I don’t forget to investigate this because I don’t have an answer just from looking at it.

I’ve looked at the code that handles IgnoreAccents all the way down to the SQLite level, but don’t see any bugs. However, we seem to be missing unit tests that verify this option (although I didn’t check the .NET bindings themselves.) Please do file a bug report on Github, on couchbase/couchbase-lite-net.

Thanks Jens. I reported it this morning here: https://github.com/couchbase/couchbase-lite-net/issues/1134