On Wed, 15 Nov 2006, Bryan Stearns wrote:

In looking into bug 5718, I noticed that string comparison for indexing is done without ignoring case.

This probably isn't what users expect, but the fix for this isn't simple: case-insensitive comparison is locale-sensitive, which would indicate that we'd need to reindex when the user changes locales, which could be expensive.

Any ideas on how to deal with this problem?

To compare strings in a locale-friendly way, use the 'string' index.
If that doesn't work because that comparison is part of another set of attributes being compared then I could implement the composite index idea I proposed a while back.

Using a 'method' or a 'compare' index with code that uses the same comparison code as that used by the StringIndex class (a PyICU Collator) is also a way to get this functionality.

Changing locales could cause the index to go out of sort. Rebuilding the index is pretty simple (though can be costly), this is what 'repair' does today. To rebuild an index, save its creation keywords with index.getInitKeywords() and type with index.getIndexType(), remove the index with removeIndex() and create the same index using the type and init keywords saved with addIndex().

Andi..
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev

Reply via email to