History log of /packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/NameNormalizerTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d2f6ad6d50b5570327f8cca3b2d2bdcaec36ea90 01-Oct-2012 Makoto Onuki <omakoto@google.com> Make sure to rebuild search index on locale changes...

so that search will still work even after changing the locale.

- Rebuild the search index upon locale changes, as it contains
locale-sensitive data.

- Also make sure to update the in-memory collator in NameNormalizer
upon locale changes.

- Rebuild the search index on the next db upgrade in order to fix the
search index which already contains invalid data.

Bug 7251461

Change-Id: Id579a67de792a52a0091bf76d7c5d374f76f1639
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/NameNormalizerTest.java
f5f038faf7f3ef460e1c11028d467954840e5f6f 14-Nov-2011 Makoto Onuki <omakoto@google.com> Fix search for hyphenated names

This issue was caused by the combination of the fact that we have two
different imcompatible tokenizers for names, and the fact that our
name-normalizer ignroes all non-letter and non-digit characters.

Basically, the name tokenizer used to build index uses ' ' as the separator,
and the one used to tokenize queries use all non-letter, non-digit characters.

Take the name "Double-barrelled" as an example. The full-text search index
for this looks like "doublebarrelled", because it's treated as one token
(because there's no spaces in it), and the normalzier removes all
non-letter/digits.

On the other hand, the query term "double-barrelled" will be split into
"double" "barrelled", and internally it becomes AND-ed prefix matches
"double* AND barrelled*". Beacuse "barrelled*" doesn't match "doublebarrelled"
the query doesn't hit.

So (for now) let's split names with '-' when buidling the index. With this
CL the index will be "double barrelled" and the query "double-barrelled"
(and also "double barrelled") *will* hit this.

Long-term we probably need a better fix.

Bug 5592553

Change-Id: I34bfa8647eec8d203f8ff7fc8a85f42505054c7c
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/NameNormalizerTest.java
8920a04b4a68ed6b548bcdef5ca8736dcf8b69b1 29-Sep-2009 Omari Stephens <xsdg@android.com> Update test documentation and suite classifications.
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/NameNormalizerTest.java
28f8857b1b46bde18b85c6d3c2a63ac44c3c2e1c 08-Jul-2009 Evan Millar <emillar@google.com> Merge commit 'goog/eclair-dev' into merge3

Merged the new contacts content provider into goog/master. The old and
new content providers now live side by side under separate authorities.

Conflicts:
Android.mk
AndroidManifest.xml
res/values/strings.xml