Class AbstractAttributeValueDocumentBuilder<T extends AttributeValue>

java.lang.Object
com.easydesk.lucene.om.builder.AbstractAttributeValueDocumentBuilder<T>
Type Parameters:
T - AttributeValue type
All Implemented Interfaces:
IndexConstants, DocumentBuilder<T>
Direct Known Subclasses:
AttributeValueDocumentBuilder, FileAttributeDocumentBuilder, FloatAttributeDocumentBuilder, OptionAttributeDocumentBuilder, RangeAttributeDocumentBuilder, StructuredStringAttributeDocumentBuilder

public abstract class AbstractAttributeValueDocumentBuilder<T extends AttributeValue> extends Object implements DocumentBuilder<T>
AttributeValue document 의 공통 field 를 만든다.

Lucene 4 의 Field(name, value, Store, Index) 는 Lucene 10 에서 다음과 같이 바뀌었다.

  • Index.NOT_ANALYZED → StringField
  • Index.ANALYZED → TextField
  • Index.NO, Store.YES → StoredField
  • IntField/LongField/FloatField → point + doc values 를 함께 index 하는 Lucene 10 IntField, LongField
Author:
YounghoCho
  • Field Details

    • log

      protected final org.slf4j.Logger log
      logger
  • Constructor Details

    • AbstractAttributeValueDocumentBuilder

      protected AbstractAttributeValueDocumentBuilder(Class<T> type)
      Parameters:
      type - OM type
  • Method Details

    • getType

      public Class<T> getType()
      Specified by:
      getType in interface DocumentBuilder<T extends AttributeValue>
      Returns:
      이 builder 가 처리하는 OM type
    • isIndexable

      protected boolean isIndexable(AttributeValue om)
      Parameters:
      om - attribute value
      Returns:
      index 대상인지 (저장되어 있고, 삭제되지 않았으며, 값이 있는 경우)
    • buildAttributeValue

      protected org.apache.lucene.document.Document buildAttributeValue(AttributeValue om) throws Exception
      AttributeValue 공통 document 를 만든다.
      Parameters:
      om - attribute value
      Returns:
      document, index 대상이 아니면 null
      Throws:
      Exception - OM 조회 오류 (새로운 Item 의 경우 ItemActivitySet 이 저장되기 전에 호출되면 오류가 발생한다.)