[Xapian-discuss] best practices - combining sql database and xapian, size of database?
per at computer.org
Fri Apr 16 19:12:46 BST 2010
Peter Karman wrote:
>> - each of my documents come with a set of attributes. These are
>> easily stored and indexed in a sql database, but I'm not quite sure
>> how I
>> would combine a sql database lookup with a xapian query? AFAICT,
>> xapian also has mechanism for associating attributes with a document,
>> might that be the right approach?
> I typically store attributes I want to be able to sort on or collapse
> on as a Xapian value. Values are not what you search for, but are
> attributes associated with a document that you can sort by, fetch,
> I usually store my db primary key as a term because I know it is
> unique and I want to be able to search for it.
Time to read the manual. Sounds like I should be storing my attributes
> If you want one example of prior art that implements the above, you
> can look at the swish_xapian code (part of Swish3). The assumption
> in that code is that you have serialized each db record into a XML doc
> (which allows for joins, etc), and created a config file that calls
> out each field/column as a MetaName and/or PropertyName. MetaNames are
> terms in a context (in a field) so you can limit a search to a
> specific field. PropertyNames are stored values. A field can be both
> (as with a date, for example).
/Per Jessen, Zürich
More information about the Xapian-discuss