org.mmbase.module.lucene
Interface IndexDefinition

All Known Implementing Classes:
JdbcIndexDefinition, MMBaseIndexDefinition

public interface IndexDefinition

Defines a query and possible options for the fields to index.

Version:
$Id: IndexDefinition.java 35592 2009-06-02 23:56:16Z michiel $
Author:
Pierre van Rooden, Michiel Meeuwissen

Method Summary
 Analyzer getAnalyzer()
          Per index a an Analyzer can be defined.
 CloseableIterator<? extends IndexEntry> getCursor()
          Returns an Iterator over all IndexEntry's defined by this index.
 String getId()
           
 Node getNode(Cloud cloud, Document doc)
          Defines how a Node for this index must be produced.
 CloseableIterator<? extends IndexEntry> getSubCursor(String key)
          Returns an Iterator over all IndexEntry's defined by this index, restricted by a certain identifier.
 boolean inIndex(String number)
          Whether the object with given key would be included in this index
 void setId(String i)
           
 

Method Detail

getCursor

CloseableIterator<? extends IndexEntry> getCursor()
Returns an Iterator over all IndexEntry's defined by this index. Only makes sense if this is not a 'sub definition'.


getSubCursor

CloseableIterator<? extends IndexEntry> getSubCursor(String key)
Returns an Iterator over all IndexEntry's defined by this index, restricted by a certain identifier. For a 'top' level index definition, this should normally return only one Entry, and the key must be the identifier of this entry. For 'nested' IndexDefinitions, the key most be the key of the parent.


getAnalyzer

Analyzer getAnalyzer()
Per index a an Analyzer can be defined.


getNode

Node getNode(Cloud cloud,
             Document doc)
Defines how a Node for this index must be produced. For MMBase indices this is of course quite straight-forward, but other indices may create virtual nodes here.


inIndex

boolean inIndex(String number)
Whether the object with given key would be included in this index


getId

String getId()

setId

void setId(String i)


MMBase 2.0-SNAPSHOT - null