|
|
@ -30,16 +30,19 @@ public final class TagIndexParams implements TagIndex {
|
|
|
|
private boolean withSuffixTrie;
|
|
|
|
private boolean withSuffixTrie;
|
|
|
|
private String separator;
|
|
|
|
private String separator;
|
|
|
|
private boolean indexEmpty;
|
|
|
|
private boolean indexEmpty;
|
|
|
|
|
|
|
|
private boolean indexMissing;
|
|
|
|
|
|
|
|
|
|
|
|
TagIndexParams(String name) {
|
|
|
|
TagIndexParams(String name) {
|
|
|
|
this.fieldName = name;
|
|
|
|
this.fieldName = name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams as(String as) {
|
|
|
|
public TagIndexParams as(String as) {
|
|
|
|
this.as = as;
|
|
|
|
this.as = as;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams separator(String separator) {
|
|
|
|
public TagIndexParams separator(String separator) {
|
|
|
|
if (separator.length() != 1) {
|
|
|
|
if (separator.length() != 1) {
|
|
|
|
throw new IllegalArgumentException("Separator should be a single character");
|
|
|
|
throw new IllegalArgumentException("Separator should be a single character");
|
|
|
@ -48,31 +51,42 @@ public final class TagIndexParams implements TagIndex {
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams sortMode(SortMode sortMode) {
|
|
|
|
public TagIndexParams sortMode(SortMode sortMode) {
|
|
|
|
this.sortMode = sortMode;
|
|
|
|
this.sortMode = sortMode;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams caseSensitive() {
|
|
|
|
public TagIndexParams caseSensitive() {
|
|
|
|
caseSensitive = true;
|
|
|
|
caseSensitive = true;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams noIndex() {
|
|
|
|
public TagIndexParams noIndex() {
|
|
|
|
noIndex = true;
|
|
|
|
noIndex = true;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams withSuffixTrie() {
|
|
|
|
public TagIndexParams withSuffixTrie() {
|
|
|
|
withSuffixTrie = true;
|
|
|
|
withSuffixTrie = true;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public TagIndexParams indexEmpty() {
|
|
|
|
public TagIndexParams indexEmpty() {
|
|
|
|
this.indexEmpty = true;
|
|
|
|
this.indexEmpty = true;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public TagIndexParams indexMissing() {
|
|
|
|
|
|
|
|
this.indexMissing = true;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getFieldName() {
|
|
|
|
public String getFieldName() {
|
|
|
|
return fieldName;
|
|
|
|
return fieldName;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -105,5 +119,9 @@ public final class TagIndexParams implements TagIndex {
|
|
|
|
return indexEmpty;
|
|
|
|
return indexEmpty;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isIndexMissing() {
|
|
|
|
|
|
|
|
return indexMissing;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|