public abstract class AbstractSearcher extends Object implements Searcher
| 构造器和说明 |
|---|
AbstractSearcher(String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getName() |
IndexResults |
search(List<? extends IndexKeyword> keywords,
SearchOption options)
搜索符合指定关键词表的条目
|
IndexResults |
search(SearchOption options,
String... keyword)
搜索符合指定关键词表的条目
|
IndexResults |
searchRange(List<? extends IndexRange> ranges,
List<? extends IndexKeyword> keywords,
SearchOption options)
按多个区间词进行搜索,通常用于数值的区间查找,但数值转换为字串前需要补零对齐,,如“010=>100”,其它字串的区间如“abc =>
cde”
[begin,end)
|
IndexResults |
searchRange(String begin,
String to,
List<? extends IndexKeyword> keywords,
SearchOption options)
按两个区间词进行搜索,通常用于数值的区间查找,但数值转换为字串前需要补零对齐,,如“010=>100”,其它字串的区间如“abc =>
cde”
[begin,end)
|
IndexResults |
searchRange(String begin,
String to,
SearchOption options)
按两个区间词进行搜索,通常用于数值的区间查找,但数值转换为字串前需要补零对齐,如“010=>100”,其它字串的区间如“abc => cde”
[begin,end)
|
IndexResults |
union(List<? extends IndexKeyword> keywords,
SearchOption options)
取指定关键词表的并集,与search的最大区别是前者的结果是“与”,后者的结果是“或”
|
IndexResults |
union(SearchOption options,
String... keyword)
取指定关键词表的并集,与search的最大区别是前者的结果是“与”,后者的结果是“或”
|
IndexResults |
unionRange(List<? extends IndexRange> ranges,
List<? extends IndexKeyword> keywords,
SearchOption options)
按多个区间词进行搜索,通常用于数值的区间查找,但数值转换为字串前需要补零对齐,,如“010=>100”,其它字串的区间如“abc =>
cde”
[begin,end)
|
void |
updateElement(IndexElement element,
String... keyword)
更新/创建索引条目
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveElement, searchAll, updateElementprotected String m_Name
public AbstractSearcher(String name)
public String getName()
getName 在接口中 cn.weforward.common.Nameablepublic void updateElement(IndexElement element, String... keyword)
SearcherupdateElement 在接口中 Searcherelement - 要索引的条目keyword - 条目所关联的关键词组public IndexResults search(SearchOption options, String... keyword)
Searcherpublic IndexResults search(List<? extends IndexKeyword> keywords, SearchOption options)
Searcherpublic IndexResults searchRange(String begin, String to, SearchOption options)
SearchersearchRange 在接口中 Searcherbegin - 区间开始值to - 区间结束值options - 选项public IndexResults searchRange(String begin, String to, List<? extends IndexKeyword> keywords, SearchOption options)
SearchersearchRange 在接口中 Searcherbegin - 区间开始值to - 区间结束值keywords - 除在begin->to之间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项public IndexResults searchRange(List<? extends IndexRange> ranges, List<? extends IndexKeyword> keywords, SearchOption options)
SearchersearchRange 在接口中 Searcherranges - 区间,区间为“&”关系,全匹配才会返回keywords - 除在区间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项public IndexResults union(SearchOption options, String... keyword)
Searcherpublic IndexResults union(List<? extends IndexKeyword> keywords, SearchOption options)
Searcherpublic IndexResults unionRange(List<? extends IndexRange> ranges, List<? extends IndexKeyword> keywords, SearchOption options)
SearcherunionRange 在接口中 Searcherranges - 区间,区间为“|”关系,全匹配才会返回keywords - 除在区间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项Copyright © 2021. All rights reserved.