public class MemoryIndex<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
MemoryIndex.Entry |
static class |
MemoryIndex.Model |
| Constructor and Description |
|---|
MemoryIndex() |
MemoryIndex(int size,
MemoryIndex.Model model)
倒排hash配置
|
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(T value,
Double score,
String... fields)
搜索提示
|
void |
addItem(T value,
String... fields) |
double |
score(T value,
Double score) |
List<T> |
smartSuggest(String key)
类似模糊查询。支持错别字,
|
String |
str2QP(String str)
将字符串转换为全拼
|
List<T> |
suggest(String key) |
public MemoryIndex(int size,
MemoryIndex.Model model)
size - 返回的条数model - 前缀 或者全索引public MemoryIndex()
Copyright © 2016. All rights reserved.