Brazilian Programmer
2006-Apr-07 00:47 UTC
[Xapian-discuss] Open a remote "WritableDatabase"
How can I open a "WritableDatabase" to insert documents in a xapian database that is in other server. I can open a connection using the xapian-tcpsrv only to do searches, but not to insert documents. Sorry for my poor English... -- Em terra de olho quem tem cego ... ops! Errei!
On Thu, Apr 06, 2006 at 08:46:29PM -0300, Brazilian Programmer wrote:> How can I open a "WritableDatabase" to insert documents in a xapian database > that is in other server.You can't at present - the remote backend only supports reading. There's no inherent reason why it shouldn't support writing, really just that nobody has wanted it enough to implement it. Cheers, Olly
richard@lemurconsulting.com
2006-Apr-07 01:36 UTC
[Xapian-discuss] Open a remote "WritableDatabase"
On Thu, Apr 06, 2006 at 08:46:29PM -0300, Brazilian Programmer wrote:> How can I open a "WritableDatabase" to insert documents in a xapian database > that is in other server. > I can open a connection using the xapian-tcpsrv only to do searches, but not > to insert documents.This isn't currently implemented. Your options for doing this are: - Modify Xapian's network backend to support modifications. This is quite a large task, and would require learning a fair amount about Xapian's internals. - Write an "index server" application (external to Xapian), which accepts documents and other modifications sent over a socket or HTTP. If general enough, this could be a useful companion to Xapian. This would be easier than modifying the network backend, because you won't need to know about Xapian's internals. - Mount your database over NFS or some other network file system, and access it for modifications through this network filesystem. However, this is likely to be rather slow, and there are potential issues with locking. I wouldn't really recommend this. - Build your database locally, and then transfer it to remote machines (possibly using something like NFS). This could be a good approach for a large scale deployment, where you have periodic updates, but a constant, high search load. I'm sure this has been discussed on the list before, and one (or both) of the first two suggestions above will be implemented at some point. So your fifth option is to wait for someone else to do it. ;-) -- Richard