Search Algorithm Used for Keyword Search

James Aylett james-xapian at tartarus.org
Sun Apr 9 09:31:21 BST 2017


On 9 Apr 2017, at 08:43, Dhiraj R <dhirajr57 at yahoo.com> wrote:

> I'm sorry I could not figure out how the document answers my question. My question is about the 'term' search in the dictionary of terms (term list) maintained by Xapian. I assume that Xapian maintains an alphabetical list of terms. When a user types a search term like "integration", the system first looks up this dictionary of terms for this word "integration". Is this search done using binary search or some other method ? 

Ah! I understand now. Xapian uses an on-disk b-tree structure for most of its backends (see for instance our wiki page on the Flint backend (from 1.0.x), although we're now a couple of iterations beyond that to Glass (1.4.x): <https://trac.xapian.org/wiki/FlintBackend/Structure>. There are various tables built using this structure, but in particular the term list uses a b-tree, and so the search is what you'd expect from that.

J

-- 
 James Aylett, occasional troublemaker & project governance
 xapian.org




More information about the Xapian-devel mailing list