[Xapian-discuss] Indexing & Querying multiple fields

M.J. van der Veen forward at mvanderveen.nl
Sun Jan 14 21:36:13 GMT 2007


Hi,

After a lot of trial and error have still not figured out how to add
multiple fields, and indices.

Let me explain with an example index file for omega scriptindex:

userid                  :    boolean=Q unique=Q field=userid
username				:    lower field=username index=XU
name					:    lower field=name index=XN
city					:    lower field=city index=XC
province				:    boolean=XPR
gender					:    boolean=XG
avatar					:    boolean=XP
birthday            	:    boolean=D
birthmonth           	:    boolean=M
birthyear            	:    boolean=Y
birthdate				:    value=1
birthdaterange			:    date=yyyymmdd
user					:    value=2
question				:    weight=3 lower index
text					:    unhtml lower index
style					:    boolean=XS

I want to be able to search with the P variable the fields 'text' and
'question'.
With this index file, only indexed words from the 'text' variable can
be somehow and now the words from the question variable. Even though
they are all correctly imported.

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 can question whether I should make these fields boolean, but my
database contains multiple words for name and city, so boolean search
is not really effective.

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. Are these
other booleans still good for anything except searching for a specific
day, month or year?

Any help is appreciated!

Cheers,

Maarten



More information about the Xapian-discuss mailing list