Class/Object

org.ensime.indexer.lucene

SimpleLucene

Related Docs: object SimpleLucene | package lucene

Permalink

class SimpleLucene extends SLF4JLogging

Lightweight convenience wrapper over Lucene that does some sanity checking, sets up per-field Analyzers and gives access to CRUD-like operations. Callers are expected to perform their own marshalling and unmarshalling for Lucene's Query and Document types.

This class is thread safe. Only one instance is allowed **on the operating system** (not just the JVM) for the same path. Lucene manages a file lock to mitigate the risk of this happening.

Technical note: Lucene is an excellent INDEX store, but is not a database. Prefer using the DatabaseProvider where possible and only fall back to using the index when SQL doesn't cut it. Excellent examples of using an index are for creating multiple representations of the same column, or for allowing allow/deny filtering rules based on tags.

Linear Supertypes
SLF4JLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SimpleLucene
  2. SLF4JLogging
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleLucene(path: Path, analyzers: Map[String, Analyzer])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def commit(): Future[Unit]

    Permalink
  7. def create(docs: Seq[Document], commit: Boolean = true): Future[Unit]

    Permalink
  8. def delete(queries: Seq[Query], commit: Boolean = true): Future[Unit]

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. lazy val log: Logger

    Permalink
    Definition Classes
    SLF4JLogging
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. def search(query: Query, limit: Int): Future[List[Document]]

    Permalink
  20. def shutdown(): Future[Unit]

    Permalink
  21. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  23. def update(delete: Seq[Query], create: Seq[Document], commit: Boolean = true): Future[Unit]

    Permalink

    Lucene does not offer an out-of-the-box UPDATE, so we have to manually DELETE then CREATE, which is problematic because Lucene DELETE can be extremely slow (plus this is not atomic).

    Lucene does not offer an out-of-the-box UPDATE, so we have to manually DELETE then CREATE, which is problematic because Lucene DELETE can be extremely slow (plus this is not atomic).

    It is a **lot** more efficient to do this in batch: expect 10,000 deletes to take about 1 second and inserts about 100ms. Each call to this method constitutes a batch UPDATE operation.

  24. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SLF4JLogging

Inherited from AnyRef

Inherited from Any

Ungrouped