CBL C# driver does not perform text prefix search as illustrated

Using the .NET CBL driver, I’m trying to perform a prefix text search using the technique in the slide linked to below. And I am not able to get expected results.

Here is a link to the gist that reproduces the issue:

Am I doing something wrong here?

Edit: After some experimentation and reviewing the docs more, found the solution is just to use capital ‘Z’ instead of that FFFE char… at least for the English language.

I’m glad you found a workaround for the time being, but I am definitely curious about why this doesn’t work using the method in the docs. This will definitely be something I look into. We are releasing 1.1 soon so I don’t think a fix will make it in time for that, but if there is a problem I can find it will definitely be part of 1.1.1 and I will let you know when it is fixed in master if I find out anything!

Oh you know what? I think it was discovered that FFFE doesn’t work as the high character for some obscure unicode-y reason (FFFE is not technically a character). Try using FEFF. That is what is tested in the unit tests for Couchbase Lite .NET. Is that slide from our official slideshare account? If so it might be outdated. I remember Jens giving a presentation at last year’s Lite mentioning to use FEFF instead of FFFE.

Sorry, same results with FEFF.

Since we do unicode collation, technically speaking you should grab something toward the end of the collation table that you’re interested in. Personally, I’ve never been that comfortable with the 0xFFEF recommendation. The higher value doesn’t necessarily mean anything.

If all you care about is latin characters, 0x02AD is actually sufficient.

These are online at unicode.org.