How to implement a new backend

Index

IndexWriter

  • Subclass semlix.writing.IndexWriter.

  • IndexWriters must implement the following methods.

  • Backends that support deletion must implement the following methods.

  • IndexWriters that work as transactions must implement the following methods.

    • semlix.reading.IndexWriter.commit() – Save the additions/deletions done with this IndexWriter to the main index, and release any resources used by the IndexWriter.

    • semlix.reading.IndexWriter.cancel() – Throw away any additions/deletions done with this IndexWriter, and release any resources used by the IndexWriter.

IndexReader

Matcher

The semlix.reading.IndexReader.postings() method returns a semlix.matching.Matcher object. You will probably need to implement a custom Matcher class for reading from your posting lists.