Yanni
02-16-2005, 04:51 AM
Keyword indexing is undoubtedly the way to go for fast searches. At times, however, one needs a phrase search; unticipating that need and inserting a specific phrase as a keyword is often not practical.
SUGGESTION: As soon as the user types a second word in the search field, UR switches to phrase search. It finds the documents that contain the word with the least occurrences and does a full-text search only on those documents. This, although slower that UR's normal keyword search, it will still be much faster than a full-text search on all documents.
EXAMPLE: I type the term "unlimited possibilities." UR knows that the keyword "unlimited" is found in 40 documents while "possibilities" occurs in some 200 documents. So it starts a full-text search for "unlimited possibilities" on the 40 documents that contain "unlimited." (Or, if time-effective, the total length of the documents that contain each word can be the factor that decides which documents are searched.) Using wildcards or regular expressions would of course make the process a bit more complicated, but still faster than a raw power full-text search.
SUGGESTION: As soon as the user types a second word in the search field, UR switches to phrase search. It finds the documents that contain the word with the least occurrences and does a full-text search only on those documents. This, although slower that UR's normal keyword search, it will still be much faster than a full-text search on all documents.
EXAMPLE: I type the term "unlimited possibilities." UR knows that the keyword "unlimited" is found in 40 documents while "possibilities" occurs in some 200 documents. So it starts a full-text search for "unlimited possibilities" on the 40 documents that contain "unlimited." (Or, if time-effective, the total length of the documents that contain each word can be the factor that decides which documents are searched.) Using wildcards or regular expressions would of course make the process a bit more complicated, but still faster than a raw power full-text search.