Skip to content

Commit

Permalink
am 1322df8: Fix extreme slowness in FTS search
Browse files Browse the repository at this point in the history
* commit '1322df8f90d80587748ad10539516635326c01e8':
  Fix extreme slowness in FTS search
  • Loading branch information
Daniel Lehmann authored and Android Git Automerger committed Nov 1, 2011
2 parents a2535f3 + 1322df8 commit 437d183
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/android/providers/contacts/ContactsProvider2.java
Expand Up @@ -5149,8 +5149,6 @@ protected Cursor queryLocal(Uri uri, String[] projection, String selection,
deferredSnipRequested);
snippetDeferred = isSingleWordQuery(filterParam) &&
deferredSnipRequested && snippetNeeded(projection);
// Omit results in "Other Contacts".
qb.appendWhere(Contacts._ID + " IN " + Tables.DEFAULT_DIRECTORY);
break;
}

Expand Down Expand Up @@ -6573,7 +6571,9 @@ public void appendSearchIndexJoin(StringBuilder sb, String filter,
sb.append(SearchIndexManager.getFtsMatchQuery(filter,
FtsQueryBuilder.SCOPED_NAME_NORMALIZING));
}
sb.append("') ON (" + Contacts._ID + "=" + SNIPPET_CONTACT_ID + ")");
// Omit results in "Other Contacts".
sb.append("' AND " + SNIPPET_CONTACT_ID + " IN " + Tables.DEFAULT_DIRECTORY + ")");
sb.append(" ON (" + Contacts._ID + "=" + SNIPPET_CONTACT_ID + ")");
}

private static String sanitizeMatch(String filter) {
Expand Down

0 comments on commit 437d183

Please sign in to comment.