[Xapian-devel] term / posting question
Alexander Lind
malte at webstay.org
Mon May 15 20:46:52 BST 2006
Olly Betts wrote:
> 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
>
Embarrassingly, it turns out that all that was missing was that the
indexing script were not lower-casing the terms before adding them to
the index, while the search script promptly lowercased all queries. The
word I was testing with was entered as "Tshirt" but queried as "tshirt".
It all works perfectly now, apologies for wasting your time.
I didn't know about the delve program. That is useful, thanks.
Cheerio
Alec
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.tartarus.org/pipermail/xapian-devel/attachments/20060515/9db075e3/attachment.html
More information about the Xapian-devel
mailing list