[Xapian-discuss] remote backend

Olly Betts olly at survex.com
Tue May 7 11:31:14 BST 2013


On Fri, Apr 26, 2013 at 09:42:33AM -0500, Michael Lewis wrote:
> So, given what I've read in the documentation I would create a text
> file named document_database.txt that might have the following:
> 
> remote 192.168.1.10:30000
> 
> chert /var/lib/xapian_database/segment1
> 
> remote 192.168.1.10:30000 chert /var/lib/xapian_database/segment2
> 
> remote 192.168.1.10:30000 chert /var/lib/xapian_database/segment3

I think your mail client has mangled the line breaks, so I'm not
exactly sure what you're trying there, but with the remote backend
over TCP, you instantiate one server for each database, and run them
on different ports, so this searches three remote databases:

remote 192.168.1.10:30000
remote 192.168.1.10:30001
remote 192.168.1.10:30002

And this searches one remote and one local database:

remote 192.168.1.10:30000
chert /var/lib/xapian_database/segment1

Though you are probably better off to use "auto" instead of "chert"
as that will work with other disk based backends.

> I would then in my PHP program open document_database.txt as the
> database and then perform normal Xapian calls. The same with Omega, I
> would, in my template, change the database name to
> document_database.txt.

Yes.  Or for omega, you can pass FMT=document_database.txt as one of the
CGI parameters.

> Given the above, it appears that I do not have to refer to each
> segment (segment1, segment2, etc.) for my calls, as it appears they
> are aggregated and treated as a single database and Xapian takes care
> of which actual database segment to search. IE, searching all the
> segments for my search terms.

Yes.

Cheers,
    Olly



More information about the Xapian-discuss mailing list