Index Component API

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at:

Search IndexingJava API

Index Manager

We do not need to expose indexing behaviour in general, this will be handled along with persistence.
It is possible we may want to rebuild an index after altering the way some attributes etc are indexed.

public void rebuildIndex(StoreRef[] storeRef)

public void rebuildAllIndexes()

public void optimizeIndex(StoreRef[] storeRef)

public void optimizeAllIndexes()

Index Transaction

Can be used to build indexes in a transaction as we go, or at the end.
It will track all the changes and may have to persist them.
The index changes will be cached using an in memory indexes and then merged into the appropriate indexes.

Note that we can get changes to nodes in many workspaces inside one transaction.

public void createIndex(NodeRef ref)
public void updateIndex(NodeRef ref)
public void deleteIndex(NodeRef ref)

public void createChild(RelationshipRef ref)
public void updateChild(RelationshipRef before, Relationship after)
public void deleteChild(RelationshipRef ref)

Transaction stuff: implements javax.transaction

On the commit we can get all the locks required and can then only fail on IO.
We only merge and delete at the commit point


  • Where would we specify index behaviour (merge docs etc) and when to optimize the index.
  • Keep index statistics and be able to report back impact of doing operations.