[Xapian-discuss] Indexing & Querying multiple fields

M.J. van der Veen forward at mvanderveen.nl
Tue Jan 16 20:56:17 GMT 2007


Ok, I'm lost

I'll give an example. I attachmed my index file, FMT template, 1 data
entry and the results of the delve -r 1 on the database.

I use Omega 0.9.7 & Xapian 0.9.7

I try the following query on the omega binary in lib/bin/

P=name:maarten
FMT=searchProfiles.xml

OR

P=XUmaarten
FMT=searchProfiles.xml

Both do not return any results. So, I'm kind of curious what I'm doing wrong..

Regards,

Maarten









On 1/16/07, Olly Betts <olly at survex.com> wrote:
> On Tue, Jan 16, 2007 at 09:24:53AM +0100, M.J. van der Veen wrote:
> > 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?
>
> It's all the same index really, but they both should generate unprefixed
> terms.
>
> I'd suggest trying to find a simple one record input file which shows
> this problem.  If it looks like a scriptindex problem, send us the
> example, or open a bug report for it.
>
> The delve tool (in the examples subdirectory of xapian-core) is a handy
> way to find out what terms index a particular document when trying to
> debug problems like this.  Another way is Omega's godmode template (use
> FMT=godmode).
>
> > >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)?
>
> Yes, the FMT template (FMT defaults to `query' if not specified).
>
> This controls the output formatting, and also allows you to specify a
> few things about the database (like these mappings from user-visible
> prefixes to term prefixes).
>
> > So, do I both need the date=yyyymmdd and the D/M/Y booleans, or can I
> > use one of both?
>
> The "date" action generates the D-, M-, and Y- terms for you, so it's
> redundant to use "date" and also add the terms yourself.
>
> > Is there a difference in performance?
>
> Not really.  There would be no difference at search time anyway.
>
> Cheers,
>     Olly
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: searchProfiles.xml
Type: text/xml
Size: 826 bytes
Desc: not available
Url : http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20070116/a9ffd492/searchProfiles.bin
-------------- next part --------------
userid=2
username=maarten
user=maarten
name=maarten
city=Groningen
province=1
gender=m
avatar=1
birthdate=19830218
birthdaterange=19830218
style=20
text=dit is mijn profiel
question=Mijn idool Britanny Beste band De sjonnies Tophit titlesong van de phantom Ik speel zelf Piano Lievelingssport Roeien
-------------- next part --------------
delve -r 1 on the database:
Term List for record #1: D19830218 M198302 Q2 Rbeste Rbritanny Rde Rik Rlievelingssport Rmijn Rpiano Rroeien Rtophit XC:Rgroningen XCgroningen XGm XNmaarten XP1 XPR1 XS20 XUmaarten Y1983 band best britanni de dit idool ik is lievelingssport mijn phantom piano profiel roeien sjonni speel titlesong tophit van zelf


More information about the Xapian-discuss mailing list