lux
Interface DocWriter

All Known Implementing Classes:
DirectDocWriter, SolrDocWriter

public interface DocWriter

DocWriter supports the insertion and deletion of documents via xquery. Writes and deletes are not visible until commit() is called.


Method Summary
 void close()
          Commits and closes the underlying IndexWriter.
 void commit()
          Commits all changes to the index, making them visible to readers.
 void delete(String uri)
          Deletes the document having the given uri, if it exists.
 void deleteAll()
          Deletes all documents in the index.
 void write(net.sf.saxon.om.NodeInfo node, String uri)
          Writes a document to the index at the given uri, with the node as its root element.
 

Method Detail

write

void write(net.sf.saxon.om.NodeInfo node,
           String uri)
Writes a document to the index at the given uri, with the node as its root element. Any existing document with the same uri will be overwritten.

Parameters:
node - A node to write as a document
uri - The uri of the document

delete

void delete(String uri)
Deletes the document having the given uri, if it exists.

Parameters:
uri -

deleteAll

void deleteAll()
Deletes all documents in the index.


commit

void commit()
Commits all changes to the index, making them visible to readers. As this may be a relatively expensive operation, it is best to delay until truly necessary.


close

void close()
Commits and closes the underlying IndexWriter.



Copyright © 2013. All Rights Reserved.