[Xapian-discuss] combining databases for omega

Jim Lynch jim at fayettedigital.com
Sun Dec 30 18:12:27 GMT 2012


On 12/30/2012 12:39 PM, Chris Purves wrote:
> From the documentation I've read, omega can read from multiple 
> databases, but I'm not sure how to go about this.
>
> I have three databases created using omindex, currently located at 
> /var/lib/xapian-omega/data/share, /var/lib/xapian-omega/data/users, 
> and /var/lib/xapiax-omega/data/management
>
> The quickstart guide says that in omega.conf database_dir should point 
> to the directory containing my database(s), but if I set it to 
> /var/lib/xapian-omega/data it only looks for the default directory.
>
> Can I configure omega to search multiple databases or should I use 
> something like xapian-compact to merge the three into one?
>
>
One way to do this is with a stub database.  This example is stolen from 
an email asking for help.

Databases:
/var/lib/xapian-omega/data/db1
/var/lib/xapian-omega/data/db2
/var/lib/xapian-omega/data/db3

Stub:
/var/lib/xapian-omega/data/default

The stub file "default" is a text file that contains the following:
auto /var/lib/xapian-omega/data/db1
auto /var/lib/xapian-omega/data/db2
auto /var/lib/xapian-omega/data/db3


/usr/lib/cgi-bin/omega/omega 'DB=default' 'P=searchphrase' 'FMT=xml'

The file doesn't have to be named default.

Hope that helps,
Jim.



More information about the Xapian-discuss mailing list