public interface Searcher
extends cn.weforward.common.Nameable
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
removeElement(String elementKey)
删除索引条目
|
IndexResults |
search(List<? extends IndexKeyword> keywords,
SearchOption options)
搜索符合指定关键词表的条目
|
IndexResults |
search(SearchOption options,
String... keyword)
搜索符合指定关键词表的条目
|
IndexResults |
searchAll(List<? extends IndexRange> andRanges,
List<? extends IndexRange> orRanges,
List<? extends IndexKeyword> andKeywords,
List<? extends IndexKeyword> orKeywords,
SearchOption options)
全索引功能
|
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,
List<? extends IndexKeyword> keywords)
更新/创建索引条目
|
void |
updateElement(IndexElement element,
String... keyword)
更新/创建索引条目
|
void updateElement(IndexElement element, List<? extends IndexKeyword> keywords)
element - 要索引的条目keywords - 条目所关联的关键词表void updateElement(IndexElement element, String... keyword)
element - 要索引的条目keyword - 条目所关联的关键词组boolean removeElement(String elementKey)
elementKey - 索引项目的标识IndexResults search(SearchOption options, String... keyword)
options - 选项keyword - 关键词(可多个),多个关键字为“&”关系,全匹配才会返回IndexResults search(List<? extends IndexKeyword> keywords, SearchOption options)
keywords - 关键词列表,多个关键字为“&”关系,全匹配才会返回options - 选项IndexResults searchRange(String begin, String to, SearchOption options)
begin - 区间开始值to - 区间结束值options - 选项IndexResults searchRange(String begin, String to, List<? extends IndexKeyword> keywords, SearchOption options)
begin - 区间开始值to - 区间结束值keywords - 除在begin->to之间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项IndexResults searchRange(List<? extends IndexRange> ranges, List<? extends IndexKeyword> keywords, SearchOption options)
ranges - 区间,区间为“&”关系,全匹配才会返回keywords - 除在区间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项IndexResults union(SearchOption options, String... keyword)
options - 选项keyword - 关键词(可多个),多个关键字为“|”关系,单个匹配就会返回IndexResults union(List<? extends IndexKeyword> keywords, SearchOption options)
keywords - 关键词列表,多个关键字为“|”关系,单个匹配就会返回options - 选项IndexResults unionRange(List<? extends IndexRange> ranges, List<? extends IndexKeyword> keywords, SearchOption options)
ranges - 区间,区间为“|”关系,全匹配才会返回keywords - 除在区间外,还匹配keywords中的关键词,多个关键字为&关系,全匹配才会返回options - 选项IndexResults searchAll(List<? extends IndexRange> andRanges, List<? extends IndexRange> orRanges, List<? extends IndexKeyword> andKeywords, List<? extends IndexKeyword> orKeywords, SearchOption options)
orRanges - “|”关系区间andRanges - “&”关系区间orKeywords - “|”关系关键字andKeywords - “&”关系关键字options - 选项Copyright © 2021. All rights reserved.