[Xapian-discuss] Best way to index relational table

Sebastian Araya cbimax at gmail.com
Mon Jul 24 15:08:31 BST 2006


Hi!


  I'm facing the following issue: I need to index with xapian a relational 
table, which has a few enumerated fields and two text fields:

E1	E2	E3	T1	T2
------------------	----------
    Enumerated             Text

  I want to index the table in order to narrow by specific field (e.g. for a 
given text in T1 and by enumerated fields E2 and E3). For example, if E2 is 
author's code, E3 is theme's code and T1 is the chapter text, I want to issue:

"there and back again author:tolkien theme:fantasy"

  I was playing with Lucene and there is an api call to index by term like 
Lucene::Keyword and Lucene::Text to index text (contents), so I can do the 
following:

  addField( Lucene::Keyword, 'author:tolkien' )
  addField( Lucene::Keyword, 'theme:fantasy' )
  addField( Lucene::Text, <textofthebook> )

  I think it is possible to do in Xapian to index termnames and termdata, but I 
don't found the right way... could you give an example or a little sample ??

  Thanks in advance!


Sebastián.






More information about the Xapian-discuss mailing list