Package com.easydesk.util.word
Class EmptySearcher
java.lang.Object
com.easydesk.util.word.EmptySearcher
- All Implemented Interfaces:
SearchIndex
- Direct Known Subclasses:
LuceneSearchIndex
검색 조건만 모으고 항상 빈 결과를 돌려준다. (test 용,
LuceneSearchIndex 의 base class)
기존 com.nannet.jettiger.util.word.EmptySearcher 의 port 이다. Fulcrum Recyclable (pool) 은 사용하지
않는다. 이 class 는 thread-safe 하지 않으므로 검색마다 새로 생성하여야 한다.
- Author:
- 조 영 호
-
Field Summary
FieldsModifier and TypeFieldDescriptionthe attachments that will be searchedthe words and boolean operatorsthe attributes that will be searchedprotected String[]index Name array for queryprotected final List<AttributeValue> the keyword attribute valuesprotected Localequery localeprotected final org.slf4j.LoggerLoggerprotected BitSetquery module filter,null이면 module 을 한정하지 않는다.protected QueryInfo[]queryInfo array to ask SearchEnginethe words and boolean operatorsprotected final List<AttributeValue> the range attribute valuesprotected intcurrent searcher userIdprotected SearchableSearchEngineFields inherited from interface com.easydesk.util.word.SearchIndex
PARSE_ERROR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttachmentQuery(Integer[] ids, String text) Specify search criteria for attachmentsvoidKeyWordQuery 는 한 속성씩 추가 된다.voidText 한 검색문자열을 여러 속성에 설정할 수 있다.voidRangeQuery 는 한 속성씩 추가 된다.voiddispose()검색 조건을 모두 지운다.String[]returns a BitSet of related item IDs sorted by relevance descending.voidDOCUMENT ME!voidsetMITFilter(BitMatrix bitMatrix, boolean includeAttachment) 검색 대상 Module/ItemType 으로 index location 과 module filter 를 구성한다.voidsetSearcher(int id) set Searcher Id and Personal InfovoidsetSearchService(Searchable searchService) DOCUMENT ME!
-
Field Details
-
log
protected final org.slf4j.Logger logLogger -
searchService
SearchEngine -
attributeIds
the attributes that will be searched -
queryText
the words and boolean operators -
rangeValues
the range attribute values -
keywordValues
the keyword attribute values -
attachmentIds
the attachments that will be searched -
attachmentQueryText
the words and boolean operators -
searcherId
protected int searcherIdcurrent searcher userId -
indexNames
index Name array for query -
moduleFilter
query module filter,null이면 module 을 한정하지 않는다. -
queryInfos
queryInfo array to ask SearchEngine -
locale
query locale
-
-
Constructor Details
-
EmptySearcher
public EmptySearcher()
-
-
Method Details
-
setSearchService
Description copied from interface:SearchIndexDOCUMENT ME!- Specified by:
setSearchServicein interfaceSearchIndex- Parameters:
searchService- DOCUMENT ME!
-
setLocale
Description copied from interface:SearchIndexDOCUMENT ME!- Specified by:
setLocalein interfaceSearchIndex- Parameters:
locale- DOCUMENT ME!
-
setMITFilter
Description copied from interface:SearchIndex검색 대상 Module/ItemType 으로 index location 과 module filter 를 구성한다.- Specified by:
setMITFilterin interfaceSearchIndex- Parameters:
bitMatrix- 검색 대상 (x : Module id, y : ItemType id), 보통MITList.getBitMatrix()includeAttachment- attachment index 도 검색할지- Throws:
TorqueException- 조회 오류
-
addQuery
Text 한 검색문자열을 여러 속성에 설정할 수 있다.- Specified by:
addQueryin interfaceSearchIndex
-
addRangeQuery
RangeQuery 는 한 속성씩 추가 된다.- Specified by:
addRangeQueryin interfaceSearchIndex
-
addKeyWordQuery
KeyWordQuery 는 한 속성씩 추가 된다.- Specified by:
addKeyWordQueryin interfaceSearchIndex- Parameters:
av- DOCUMENT ME!
-
addAttachmentQuery
Description copied from interface:SearchIndexSpecify search criteria for attachments- Specified by:
addAttachmentQueryin interfaceSearchIndex
-
setSearcher
public void setSearcher(int id) set Searcher Id and Personal Info- Specified by:
setSearcherin interfaceSearchIndex- Parameters:
id- searcher
-
getRelatedItems
Description copied from interface:SearchIndexreturns a BitSet of related item IDs sorted by relevance descending. Should return an empty/length=0 BitSet if search returns no results.- Specified by:
getRelatedItemsin interfaceSearchIndex- Returns:
- always empty bitSet
- Throws:
TorqueExceptionIOException- when searchEngine trouble
-
getIndexNames
- Returns:
- 검색할 index location (test/debug 용)
-
getModuleFilter
- Returns:
- module filter (test/debug 용),
null이면 module 을 한정하지 않는다.
-
dispose
public void dispose()검색 조건을 모두 지운다.
-