Package com.easydesk.util.word
Class LuceneSearchIndex
java.lang.Object
com.easydesk.util.word.EmptySearcher
com.easydesk.util.word.LuceneSearchIndex
- All Implemented Interfaces:
SearchIndex
Lucene (
Searchable) 을 사용하는 SearchIndex.
기존 com.nannet.jettiger.util.word.JetTigerAdapter 의 port 이다.
- index location 은
IndexLocations규칙 (<moduleId>/attribute/<itemTypeId>) 을 사용한다. (기존<category>/attribute/<itemType 이름>) BitMatrix(x : Module id, y : ItemType id) 의 설정된 (Module, ItemType) 마다 index location 을 만든다.- 어떤 ItemType 에 대하여 모든 Module 이 설정되어 있으면 (
MITListItem의 All Module) wild card (*/attribute/<itemTypeId>) 를 사용하고 기존과 같이 module 을 한정하지 않는다. (moduleFilter = null)
SearchFactory.getInstance() 로 새로 생성하여 사용하여야 한다.- Author:
- 조 영 호
-
Field Summary
Fields inherited from class com.easydesk.util.word.EmptySearcher
attachmentIds, attachmentQueryText, attributeIds, indexNames, keywordValues, locale, log, moduleFilter, queryInfos, queryText, rangeValues, searcherId, searchServiceFields inherited from interface com.easydesk.util.word.SearchIndex
PARSE_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommentQuery(List<QueryInfo> infos) protected voidaddKeywordFilter(List<QueryInfo> infos) KeyWord : MUSTprotected voidaddNumericRangeFilter(List<QueryInfo> infos) protected voidaddQueryTextFilter(List<QueryInfo> infos) Text : SHOULDreturns a BitSet of related item IDs.protected voidmultifield query 를 준비한다.voidsetMITFilter(BitMatrix bitMatrix, boolean includeAttachment) Module Filter 와 indexNames array 를 구성한다.Methods inherited from class com.easydesk.util.word.EmptySearcher
addAttachmentQuery, addKeyWordQuery, addQuery, addRangeQuery, dispose, getIndexNames, getModuleFilter, setLocale, setSearcher, setSearchService
-
Constructor Details
-
LuceneSearchIndex
public LuceneSearchIndex()
-
-
Method Details
-
setMITFilter
Module Filter 와 indexNames array 를 구성한다.All Modules
GroupEnum.ALL, All ItemTypesItemTypeEnum.ALL의 id (0) 자체는 index location 으로 사용하지 않는다.- Specified by:
setMITFilterin interfaceSearchIndex- Overrides:
setMITFilterin classEmptySearcher- Parameters:
bitMatrix- 검색 대상 (x : Module id, y : ItemType id),null이면 검색 대상이 없다.includeAttachment- attachment index 도 검색할지- Throws:
TorqueException- 조회 오류
-
getRelatedItems
returns a BitSet of related item IDs. Should return an empty/length=0 BitSet if search returns no results.- Specified by:
getRelatedItemsin interfaceSearchIndex- Overrides:
getRelatedItemsin classEmptySearcher- Returns:
- bitSet
- Throws:
TorqueExceptionIOException- when searchEngine trouble
-
prepareQuery
multifield query 를 준비한다. 일단 NumericRange, Keyword 는 AND 나머지는 OR- Throws:
TorqueException
-
addNumericRangeFilter
-
addCommentQuery
-
addKeywordFilter
KeyWord : MUST- Throws:
TorqueException
-
addQueryTextFilter
Text : SHOULD
-