Class DocumentWrapper

java.lang.Object
com.easydesk.lucene.util.DocumentWrapper
All Implemented Interfaces:
Indexable, IndexConstants

public class DocumentWrapper extends Object implements Indexable
Simple Indexable 구현
Author:
조 영 호
  • Constructor Details

    • DocumentWrapper

      public DocumentWrapper(org.apache.lucene.index.Term term, org.apache.lucene.document.Document document)
      Creates a new DocumentWrapper object without location.
      Parameters:
      term - unique term
      document - document, null 이면 제거
    • DocumentWrapper

      public DocumentWrapper(org.apache.lucene.index.Term term, org.apache.lucene.document.Document document, String location)
      Creates a new DocumentWrapper object.
      Parameters:
      term - unique term
      document - document, null 이면 제거
      location - index location
  • Method Details

    • getLocation

      public String getLocation()
      Description copied from interface: Indexable
      index location (index root 기준 상대 경로) 을 구한다.
      Specified by:
      getLocation in interface Indexable
      Returns:
      index location
    • getTerm

      public org.apache.lucene.index.Term getTerm()
      Returns:
      unique term
    • getUniqueTerm

      public org.apache.lucene.index.Term getUniqueTerm()
      Description copied from interface: Indexable
      update/remove 를 위한 unique term 을 만든다.

      이 term 의 field 는 document 에 keyword 로 index 되어 있어야 한다.

      Specified by:
      getUniqueTerm in interface Indexable
      Returns:
      term for update/remove
    • getDocument

      public org.apache.lucene.document.Document getDocument()
      Description copied from interface: Indexable
      indexing 을 위한 document 를 만든다.
      Specified by:
      getDocument in interface Indexable
      Returns:
      document for indexing, null 이면 index 에서 제거한다.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object