[Xapian-discuss] Indexing & Querying multiple fields
Olly Betts
olly at survex.com
Mon Jan 15 21:05:10 GMT 2007
On Sun, Jan 14, 2007 at 10:36:13PM +0100, M.J. van der Veen wrote:
> I want to be able to search with the P variable the fields 'text' and
> 'question'.
Then the following two lines look reasonable:
> question : weight=3 lower index
> text : unhtml lower index
The "lower" action probably isn't wanted, unless you want to disable the
generation of R-prefixed terms for capitalised words. The "index"
action handles case conversion of the terms it generates.
> With this index file, only indexed words from the 'text' variable can
> be somehow and now the words from the question variable.
Sorry, I don't understand what you're saying here.
> Secondly, I want to be able to search name, username and city
> probabilistically. I'm not sure if I'm doing this right, but I thought
> that "P = XUmaarten" would allow me to probabilistically search the
> username field? Nonetheless, it's not working.
You need to add something like $setmap{prefix,user,XU} to your query
template, and then you can use user:maarten in the P parameter. See
termprefixes.txt in the Omega docs for details - you want to read the
section "Probabilistic Fields":
http://svn.xapian.org/trunk/xapian-applications/omega/docs/termprefixes.txt?view=co
> Last and final question. I've been unable to search ranges with the D,
> M, and Y booleans. so I added a date=yyymmdd field aswell.
What did you put in your D and M terms? For the date range searching to
work, D must give the year and month, and M the year - e.g. for today,
the terms are: D20070115 M200701 Y2007
If you were adding D15 M01 Y2007 then the daterange searching wouldn't
work.
> Are these other booleans still good for anything except searching for
> a specific day, month or year?
No.
Cheers,
Olly
More information about the Xapian-discuss
mailing list