<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Olly Betts wrote:
<blockquote cite="mid20060515191520.GY21384@survex.com" type="cite">
<pre wrap="">On Mon, May 15, 2006 at 11:55:49AM -0700, Alexander Lind wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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?
</pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</blockquote>
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".<br>
<br>
It all works perfectly now, apologies for wasting your time.<br>
<br>
I didn't know about the delve program. That is useful, thanks.<br>
<br>
Cheerio<br>
Alec<br>
</body>
</html>