LuceneDataSource (Neo4j Apoc 1.1 API)
Keywords: org.neo4j.index.lucene.LuceneDataSource class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.neo4j.index.lucene
Class LuceneDataSource

    java.lang.Object
      org.neo4j.kernel.impl.transaction.xaframework.XaDataSource
          org.neo4j.index.lucene.LuceneDataSource

Direct Known Subclasses:
  LuceneFulltextDataSource

    public class LuceneDataSource

extends org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

An `XaDataSource` optimized for the `LuceneIndexService`. This class is public because the XA framework requires it.

Field Summary
`static org.apache.lucene.analysis.Analyzer` | `LOWER_CASE_WHITESPACE_ANALYZER` Default `Analyzer` for fulltext parsing.

Constructor Summary
`LuceneDataSource(Map<Object,Object> params)` Constructs this data source.

Method Summary
`void` | `applyLog(ReadableByteChannel byteChannel)`
`void` | `close()`
`protected void` | `configureLog(Map<?,?> config)`
`protected void` | `deleteDocumentsUsingWriter(org.apache.lucene.index.IndexWriter writer, Long nodeId, Object value)`
`boolean` | `deleteLogicalLog(long version)`
`protected void` | `fillDocument(org.apache.lucene.document.Document document, long nodeId, String key, Object value)`
`protected org.apache.lucene.analysis.Analyzer` | `getAnalyzer()`
`long` | `getCreationTime()`
`long` | `getCurrentLogVersion()`
`protected String` | `getDeleteDocumentsKey()`
`String` | `getFileName(long version)`
`LuceneIndexService` | `getIndexService()` Returns the `LuceneIndexService` instance which created this data source.
`protected org.apache.lucene.document.Field.Index` | `getIndexStrategy(String key, Object value)`
`protected org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog` | `getLogicalLog()`
`ReadableByteChannel` | `getLogicalLog(long version)`
`long` | `getLogicalLogLength(long version)`
`long` | `getRandomIdentifier()`
`org.neo4j.kernel.impl.transaction.xaframework.XaConnection` | `getXaConnection()`
`boolean` | `hasLogicalLog(long version)`
`boolean` | `isLogicalLogKept()`
`void` | `keepLogicalLogs(boolean keep)`
`void` | `makeBackupSlave()`
`void` | `rotateLogicalLog()`
`void` | `setAutoRotate(boolean rotate)`
`protected void` | `setIndexService(LuceneIndexService indexService)` This is here so that `LuceneIndexService#formQuery(String, Object)` can be used when getting stuff from inside a transaction.
`void` | `setLogicalLogTargetSize(long size)`

Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource
`getBranchId, getName, setBranchId, setName, shouldKeepLog`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LOWER_CASE_WHITESPACE_ANALYZER

    public static final org.apache.lucene.analysis.Analyzer LOWER_CASE_WHITESPACE_ANALYZER

  Default `Analyzer` for fulltext parsing.

Constructor Detail

### LuceneDataSource

    public LuceneDataSource(Map<Object,Object> params)
                     throws InstantiationException

  Constructs this data source.

  Parameters:
    `params` - XA parameters.
  Throws:
    `InstantiationException` - if the data source couldn't be instantiated

Method Detail

### getLogicalLog

    protected org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog getLogicalLog()

### configureLog

    protected void configureLog(Map<?,?> config)

### setIndexService

    protected void setIndexService(LuceneIndexService indexService)

  This is here so that `LuceneIndexService#formQuery(String, Object)` can be used when getting stuff from inside a transaction.

  Parameters:
    `indexService` - the `LuceneIndexService` instance which created it.

### getIndexService

    public LuceneIndexService getIndexService()

  Returns the `LuceneIndexService` instance which created this data source.

  Returns:
    the `LuceneIndexService` instance which created this data source.

### close

    public void close()

  Specified by:
    `close` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getXaConnection

    public org.neo4j.kernel.impl.transaction.xaframework.XaConnection getXaConnection()

  Specified by:
    `getXaConnection` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getAnalyzer

    protected org.apache.lucene.analysis.Analyzer getAnalyzer()

### deleteDocumentsUsingWriter

    protected void deleteDocumentsUsingWriter(org.apache.lucene.index.IndexWriter writer,
                                              Long nodeId,
                                              Object value)

### getDeleteDocumentsKey

    protected String getDeleteDocumentsKey()

### fillDocument

    protected void fillDocument(org.apache.lucene.document.Document document,
                                long nodeId,
                                String key,
                                Object value)

### getIndexStrategy

    protected org.apache.lucene.document.Field.Index getIndexStrategy(String key,
                                                                      Object value)

### keepLogicalLogs

    public void keepLogicalLogs(boolean keep)

  Overrides:
    `keepLogicalLogs` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getCreationTime

    public long getCreationTime()

  Overrides:
    `getCreationTime` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getRandomIdentifier

    public long getRandomIdentifier()

  Overrides:
    `getRandomIdentifier` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getCurrentLogVersion

    public long getCurrentLogVersion()

  Overrides:
    `getCurrentLogVersion` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### applyLog

    public void applyLog(ReadableByteChannel byteChannel)
                  throws IOException

  Overrides:
    `applyLog` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`
  Throws:
    `IOException`

### rotateLogicalLog

    public void rotateLogicalLog()
                          throws IOException

  Overrides:
    `rotateLogicalLog` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`
  Throws:
    `IOException`

### getLogicalLog

    public ReadableByteChannel getLogicalLog(long version)
                                      throws IOException

  Overrides:
    `getLogicalLog` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`
  Throws:
    `IOException`

### hasLogicalLog

    public boolean hasLogicalLog(long version)

  Overrides:
    `hasLogicalLog` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### deleteLogicalLog

    public boolean deleteLogicalLog(long version)

  Overrides:
    `deleteLogicalLog` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### setAutoRotate

    public void setAutoRotate(boolean rotate)

  Overrides:
    `setAutoRotate` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### setLogicalLogTargetSize

    public void setLogicalLogTargetSize(long size)

  Overrides:
    `setLogicalLogTargetSize` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### makeBackupSlave

    public void makeBackupSlave()

  Overrides:
    `makeBackupSlave` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getFileName

    public String getFileName(long version)

  Overrides:
    `getFileName` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### getLogicalLogLength

    public long getLogicalLogLength(long version)

  Overrides:
    `getLogicalLogLength` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

### isLogicalLogKept

    public boolean isLogicalLogKept()

  Overrides:
    `isLogicalLogKept` in class `org.neo4j.kernel.impl.transaction.xaframework.XaDataSource`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Neo4j. All Rights Reserved.