[Xapian-discuss] Indexing & Querying multiple fields
M.J. van der Veen
forward at mvanderveen.nl
Tue Jan 16 08:24:53 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.
hmm ;-)
I intended to say that with this index file, words indexed in the
'text' field can be found, but those in the 'question' field can't.
I'm not sure why, since they are both in the general index?
>
> > 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
>
I thought this was only the case when you search with the omega cgi?
However, I have a socket connection to the omega binary. Do I still
need the query template then? Or do you mean the FMT template (which
is only for parsing output right)?
> > 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.
>
So, do I both need the date=yyyymmdd and the D/M/Y booleans, or can I
use one of both?
Is there a difference in performance?
> > Are these other booleans still good for anything except searching for
> > a specific day, month or year?
>
> No.
>
> Cheers,
> Olly
Cheers,
Maarten
More information about the Xapian-discuss
mailing list