[Xapian-discuss] Searching in all "fields" by default

Peter Karman peter at peknet.com
Sun Nov 23 18:47:05 GMT 2008


Henry wrote on 11/22/08 2:02 PM:
> Hello all,
> 
> Our application uses several dozen 'fields' as the basis for searching  
> (migrating from another indexing system).  ie, all indexed data is  
> stored in fields.  Searching these fields works as expected (ie, with  
> prefixes, etc).
> 
> To my chagrin, I've encountered an unexpected problem:  the previous  
> indexing system would search all fields by default, but Xapian  
> requires you to specify the fields you want to search in...  am I  
> understanding this correctly?  If I search for 'title:bob', I get  
> results as expected; if I search for 'bob' I get 0.

Xapian doesn't really have a 'field' feature. The prefix is used to mimic the
idea of a field. You need to index each term with and without a prefix to get
the effect you want.

-- 
Peter Karman  .  http://peknet.com/  .  peter at peknet.com



More information about the Xapian-discuss mailing list