[Xapian-devel] term / posting question

Olly Betts olly at survex.com
Mon May 15 20:15:20 BST 2006


On Mon, May 15, 2006 at 11:55:49AM -0700, Alexander Lind wrote:
> I know the term is for sure in the document, because if I list the terms
> with termiterator_get_term(), the term that I am trying to search for
> above is listed.
> 
> Have I misunderstood what the terms should be used for, or is there some
> option that I should pass to the enquire function to make it look in the
> term list as well?

The only difference between add_term and add_posting is that add_posting
also adds positional information.

My only thought is that it might be that you're stemming postings but
not terms, and then stemming at search time, or something like that.

A good way to look at what is really in the database is to use the
"delve" utility, which you can find in xapian-core/examples.  So
for example you can list which documents index term "TERM" like this:

delve -t TERM DATABASE

If that doesn't resolve it, try to produce a small, self-contained
example showing the problem e.g. create a database, add a document with
some terms, and then fail to find that document when searching for one
of them.

Cheers,
    Olly



More information about the Xapian-devel mailing list