[Xapian-discuss] Newbie question: searching certain fields only

Richard Boulton richard at tartarus.org
Mon Sep 27 12:17:03 BST 2010


On 27 September 2010 11:40, goran kent <gorankent at gmail.com> wrote:
>> This results in fewer terms in the index, but searches without a prefix
>> need to look up two terms rather than just one, so it's not obvious which
>> is likely to be more efficient.
> with your inside knowledge, which do you think is more likely to be the most
> efficient in search performance?

I agree with Olly's comment: "it's not obvious which is likely to be
more efficient".

With the extra unprefixed terms, you have a larger index, which may
result increased disk IO because less of the index can be held in
memory, resulting in slower searches.  Or, it may result in faster
searches, because you might rarely access the prefixed terms, so the
OS will cache the data for the unprefixed terms preferentially,
resulting in a greater proportion of the data you need to access in
typical searches being cached.

Another major factors to think about is what kind of update load
you're putting on the system, which will be causing parts of the index
to drop out of cache.

Really, the only way to be sure is to try both out and benchmark.
But, first, I'd just pick whichever option is simplest for you to
implement, try it out, and if the performance is acceptable you don't
need to worry about improving it!

-- 
Richard



More information about the Xapian-discuss mailing list