[Xapian-discuss] indexing of individual fields + all fields

Jim Spath jspath at pangeamedia.com
Mon Oct 29 17:34:07 GMT 2007


In our search app, users currently search 4 different fields at the same 
time.

I am adding functionality so that users can optionally limit their 
search to individual fields.

I was able to get this to work with omega scriptindex by indexing these 
fields twice... once as a group, and once individually:

   field1 : weight=4 index index=XFIELD1
   field2 : weight=3 index index=XFIELD2
   field3 : weight=2 index index=XFIELD3
   field4 : weight=1 index index=XFIELD

I have tested this and it seems to work, but I am wondering if it is the 
best way to implement it.

The solution seems like it would provide the best performance for 
searches, since most of the searches will search all fields at once, but 
probably take longer to build the index and more storage space to store 
the index.

Thoughts?

- Jim



More information about the Xapian-discuss mailing list