[Xapian-discuss] Xapian's definition of a field

Henry henka at cityweb.co.za
Thu Nov 6 15:43:15 GMT 2008


Greets,

It's been a long day, and my brain is becoming mushy, so forgive my  
silly questions:

I'm coming from another indexing system/paradigm which uses named  
"fields" which store strings which are subsequently searched on  
thusly:  title:internet

The only reference to "fields" I can find in the Xapian API docs is  
add_prefix("field", "P"), etc, but this seems to be unrelated.

I understand the use of add_posting() calls (which seems to be  
"anonymous" in the sense that you only specify the term itself, not a  
label/name) to build a document which is then indexed, etc.  However,  
how do you define named "fields" in a document which can be used in  
searches such as site:www.abc.com?

Lastly, what is add_value(valueno, strvalue) for?  :-))  I can't  
figure it out.  set_data() I get - I can stuff some useful variables  
therein for special use, but add_value() with a value number?  Is it  
also simply to store values in for special use?  Does it influence  
indexing/searching somehow?

Thanks!
Henry



More information about the Xapian-discuss mailing list