fix #2195 remove targetLabel/targetRole

This commit is contained in:
Shinsuke Sugaya 2019-07-26 23:49:39 +09:00
parent 48b9737669
commit d9ce028f09
10 changed files with 50 additions and 789 deletions

View file

@ -22,12 +22,6 @@
"suggestWord" : {
"type" : "keyword"
},
"targetLabel" : {
"type" : "keyword"
},
"targetRole" : {
"type" : "keyword"
},
"updatedBy" : {
"type" : "keyword"
},

View file

@ -35,6 +35,7 @@ import org.codelibs.fess.es.client.FessEsClient;
import org.codelibs.fess.es.config.cbean.ElevateWordCB;
import org.codelibs.fess.es.config.exbhv.ElevateWordBhv;
import org.codelibs.fess.es.config.exbhv.ElevateWordToLabelBhv;
import org.codelibs.fess.es.config.exbhv.LabelTypeBhv;
import org.codelibs.fess.es.config.exentity.ElevateWord;
import org.codelibs.fess.es.config.exentity.ElevateWordToLabel;
import org.codelibs.fess.helper.PermissionHelper;
@ -60,6 +61,9 @@ public class ElevateWordService {
@Resource
protected ElevateWordBhv elevateWordBhv;
@Resource
protected LabelTypeBhv labelTypeBhv;
@Resource
protected FessConfig fessConfig;
@ -201,15 +205,14 @@ public class ElevateWordService {
split(getValue(list, 2), ",").get(
stream -> stream.map(permissionHelper::encode).filter(StringUtil::isNotBlank).distinct()
.toArray(n -> new String[n]));
final String label = getValue(list, 3);
final String[] labels =
split(getValue(list, 3), ",").get(
stream -> stream.filter(StringUtil::isNotBlank).distinct().toArray(n -> new String[n]));
ElevateWord elevateWord = elevateWordBhv.selectEntity(cb -> {
cb.query().setSuggestWord_Equal(suggestWord);
if (permissions.length > 0) {
cb.query().setPermissions_InScope(stream(permissions).get(stream -> stream.collect(Collectors.toList())));
}
if (StringUtil.isNotBlank(label)) {
cb.query().setTargetLabel_Equal(label);
}
}).orElse(null);
final String reading = getValue(list, 1);
final String boost = getValue(list, 4);
@ -219,13 +222,26 @@ public class ElevateWordService {
elevateWord.setSuggestWord(suggestWord);
elevateWord.setReading(reading);
elevateWord.setPermissions(permissions);
elevateWord.setTargetLabel(label);
elevateWord.setBoost(StringUtil.isBlank(boost) ? 1.0f : Float.parseFloat(boost));
elevateWord.setCreatedBy(Constants.SYSTEM_USER);
elevateWord.setCreatedTime(now);
elevateWordBhv.insert(elevateWord);
final String id = elevateWord.getId();
final List<ElevateWordToLabel> mappingList =
stream(labels).get(
stream -> stream.map(l -> labelTypeBhv.selectEntity(cb -> cb.query().setValue_Equal(l)).map(e -> {
final ElevateWordToLabel m = new ElevateWordToLabel();
m.setElevateWordId(id);
m.setLabelTypeId(e.getId());
return m;
}).orElse(null)).filter(e -> e != null).collect(Collectors.toList()));
if (!mappingList.isEmpty()) {
elevateWordToLabelBhv.batchInsert(mappingList);
}
} else if (StringUtil.isBlank(reading) && StringUtil.isBlank(boost)) {
elevateWordBhv.delete(elevateWord);
final String id = elevateWord.getId();
elevateWordToLabelBhv.queryDelete(cb -> cb.query().setElevateWordId_Equal(id));
} else {
elevateWord.setReading(reading);
elevateWord.setPermissions(permissions);
@ -233,6 +249,25 @@ public class ElevateWordService {
elevateWord.setUpdatedBy(Constants.SYSTEM_USER);
elevateWord.setUpdatedTime(now);
elevateWordBhv.update(elevateWord);
final String id = elevateWord.getId();
final List<ElevateWordToLabel> mappingList =
stream(labels).get(
stream -> stream.map(l -> labelTypeBhv.selectEntity(cb -> cb.query().setValue_Equal(l)).map(e -> {
final List<ElevateWordToLabel> mList = elevateWordToLabelBhv.selectList(cb -> {
cb.query().setElevateWordId_Equal(id);
cb.query().setLabelTypeId_Equal(e.getId());
});
if (!mList.isEmpty()) {
return null;
}
final ElevateWordToLabel m = new ElevateWordToLabel();
m.setElevateWordId(id);
m.setLabelTypeId(e.getId());
return m;
}).orElse(null)).filter(e -> e != null).collect(Collectors.toList()));
if (!mappingList.isEmpty()) {
elevateWordToLabelBhv.batchInsert(mappingList);
}
}
} catch (final Exception e) {
logger.warn("Failed to read a sugget elevate word: " + list, e);
@ -256,7 +291,7 @@ public class ElevateWordService {
list.add("SuggestWord");
list.add("Reading");
list.add("Permissions");
list.add("Label");
list.add("Labels");
list.add("Boost");
csvWriter.writeValues(list);
@ -268,10 +303,17 @@ public class ElevateWordService {
stream(entity.getPermissions()).get(
stream -> stream.map(s -> permissionHelper.decode(s)).filter(StringUtil::isNotBlank).distinct()
.collect(Collectors.joining(",")));
final String labels =
elevateWordToLabelBhv
.selectList(cb -> cb.query().setElevateWordId_Equal(entity.getId()))
.stream()
.map(e -> labelTypeBhv.selectByPK(e.getLabelTypeId()).map(lt -> lt.getValue())
.filter(StringUtil::isNotBlank).orElse(null)).distinct().sorted()
.collect(Collectors.joining(","));
addToList(list, entity.getSuggestWord());
addToList(list, entity.getReading());
addToList(list, permissions);
addToList(list, entity.getTargetLabel());
addToList(list, labels);
addToList(list, entity.getBoost());
try {
csvWriter.writeValues(list);

View file

@ -79,8 +79,6 @@ public abstract class BsElevateWordBhv extends EsAbstractBehavior<ElevateWord, E
result.setPermissions(toStringArray(source.get("permissions")));
result.setReading(DfTypeUtil.toString(source.get("reading")));
result.setSuggestWord(DfTypeUtil.toString(source.get("suggestWord")));
result.setTargetLabel(DfTypeUtil.toString(source.get("targetLabel")));
result.setTargetRole(DfTypeUtil.toString(source.get("targetRole")));
result.setUpdatedBy(DfTypeUtil.toString(source.get("updatedBy")));
result.setUpdatedTime(DfTypeUtil.toLong(source.get("updatedTime")));
return updateEntity(source, result);

View file

@ -55,12 +55,6 @@ public class BsElevateWord extends EsAbstractEntity {
/** suggestWord */
protected String suggestWord;
/** targetLabel */
protected String targetLabel;
/** targetRole */
protected String targetRole;
/** updatedBy */
protected String updatedBy;
@ -106,12 +100,6 @@ public class BsElevateWord extends EsAbstractEntity {
if (suggestWord != null) {
addFieldToSource(sourceMap, "suggestWord", suggestWord);
}
if (targetLabel != null) {
addFieldToSource(sourceMap, "targetLabel", targetLabel);
}
if (targetRole != null) {
addFieldToSource(sourceMap, "targetRole", targetRole);
}
if (updatedBy != null) {
addFieldToSource(sourceMap, "updatedBy", updatedBy);
}
@ -137,8 +125,6 @@ public class BsElevateWord extends EsAbstractEntity {
sb.append(dm).append(permissions);
sb.append(dm).append(reading);
sb.append(dm).append(suggestWord);
sb.append(dm).append(targetLabel);
sb.append(dm).append(targetRole);
sb.append(dm).append(updatedBy);
sb.append(dm).append(updatedTime);
if (sb.length() > dm.length()) {
@ -211,26 +197,6 @@ public class BsElevateWord extends EsAbstractEntity {
this.suggestWord = value;
}
public String getTargetLabel() {
checkSpecifiedProperty("targetLabel");
return convertEmptyToNull(targetLabel);
}
public void setTargetLabel(String value) {
registerModifiedProperty("targetLabel");
this.targetLabel = value;
}
public String getTargetRole() {
checkSpecifiedProperty("targetRole");
return convertEmptyToNull(targetRole);
}
public void setTargetRole(String value) {
registerModifiedProperty("targetRole");
this.targetRole = value;
}
public String getUpdatedBy() {
checkSpecifiedProperty("updatedBy");
return convertEmptyToNull(updatedBy);

View file

@ -90,10 +90,6 @@ public class ElevateWordDbm extends AbstractDBMeta {
"reading");
setupEpg(_epgMap, et -> ((ElevateWord) et).getSuggestWord(),
(et, vl) -> ((ElevateWord) et).setSuggestWord(DfTypeUtil.toString(vl)), "suggestWord");
setupEpg(_epgMap, et -> ((ElevateWord) et).getTargetLabel(),
(et, vl) -> ((ElevateWord) et).setTargetLabel(DfTypeUtil.toString(vl)), "targetLabel");
setupEpg(_epgMap, et -> ((ElevateWord) et).getTargetRole(), (et, vl) -> ((ElevateWord) et).setTargetRole(DfTypeUtil.toString(vl)),
"targetRole");
setupEpg(_epgMap, et -> ((ElevateWord) et).getUpdatedBy(), (et, vl) -> ((ElevateWord) et).setUpdatedBy(DfTypeUtil.toString(vl)),
"updatedBy");
setupEpg(_epgMap, et -> ((ElevateWord) et).getUpdatedTime(), (et, vl) -> ((ElevateWord) et).setUpdatedTime(DfTypeUtil.toLong(vl)),
@ -146,10 +142,6 @@ public class ElevateWordDbm extends AbstractDBMeta {
"keyword", 0, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnSuggestWord = cci("suggestWord", "suggestWord", null, null, String.class, "suggestWord", null, false,
false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnTargetLabel = cci("targetLabel", "targetLabel", null, null, String.class, "targetLabel", null, false,
false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnTargetRole = cci("targetRole", "targetRole", null, null, String.class, "targetRole", null, false,
false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnUpdatedBy = cci("updatedBy", "updatedBy", null, null, String.class, "updatedBy", null, false, false,
false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
protected final ColumnInfo _columnUpdatedTime = cci("updatedTime", "updatedTime", null, null, Long.class, "updatedTime", null, false,
@ -179,14 +171,6 @@ public class ElevateWordDbm extends AbstractDBMeta {
return _columnSuggestWord;
}
public ColumnInfo columnTargetLabel() {
return _columnTargetLabel;
}
public ColumnInfo columnTargetRole() {
return _columnTargetRole;
}
public ColumnInfo columnUpdatedBy() {
return _columnUpdatedBy;
}
@ -203,8 +187,6 @@ public class ElevateWordDbm extends AbstractDBMeta {
ls.add(columnPermissions());
ls.add(columnReading());
ls.add(columnSuggestWord());
ls.add(columnTargetLabel());
ls.add(columnTargetRole());
ls.add(columnUpdatedBy());
ls.add(columnUpdatedTime());
return ls;

View file

@ -200,14 +200,6 @@ public class BsElevateWordCB extends EsAbstractConditionBean {
doColumn("suggestWord");
}
public void columnTargetLabel() {
doColumn("targetLabel");
}
public void columnTargetRole() {
doColumn("targetRole");
}
public void columnUpdatedBy() {
doColumn("updatedBy");
}

View file

@ -1079,268 +1079,6 @@ public abstract class BsElevateWordCA extends EsAbstractConditionAggregation {
}
}
public void setTargetLabel_Terms() {
setTargetLabel_Terms(null);
}
public void setTargetLabel_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda) {
setTargetLabel_Terms("targetLabel", opLambda, null);
}
public void setTargetLabel_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetLabel_Terms("targetLabel", opLambda, aggsLambda);
}
public void setTargetLabel_Terms(String name, ConditionOptionCall<TermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
TermsAggregationBuilder builder = regTermsA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetLabel_SignificantTerms() {
setTargetLabel_SignificantTerms(null);
}
public void setTargetLabel_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda) {
setTargetLabel_SignificantTerms("targetLabel", opLambda, null);
}
public void setTargetLabel_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetLabel_SignificantTerms("targetLabel", opLambda, aggsLambda);
}
public void setTargetLabel_SignificantTerms(String name, ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetLabel_IpRange() {
setTargetLabel_IpRange(null);
}
public void setTargetLabel_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda) {
setTargetLabel_IpRange("targetLabel", opLambda, null);
}
public void setTargetLabel_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetLabel_IpRange("targetLabel", opLambda, aggsLambda);
}
public void setTargetLabel_IpRange(String name, ConditionOptionCall<IpRangeAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
IpRangeAggregationBuilder builder = regIpRangeA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetLabel_Count() {
setTargetLabel_Count(null);
}
public void setTargetLabel_Count(ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
setTargetLabel_Count("targetLabel", opLambda);
}
public void setTargetLabel_Count(String name, ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
ValueCountAggregationBuilder builder = regCountA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Cardinality() {
setTargetLabel_Cardinality(null);
}
public void setTargetLabel_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
setTargetLabel_Cardinality("targetLabel", opLambda);
}
public void setTargetLabel_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
CardinalityAggregationBuilder builder = regCardinalityA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Missing() {
setTargetLabel_Missing(null);
}
public void setTargetLabel_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda) {
setTargetLabel_Missing("targetLabel", opLambda, null);
}
public void setTargetLabel_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetLabel_Missing("targetLabel", opLambda, aggsLambda);
}
public void setTargetLabel_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
MissingAggregationBuilder builder = regMissingA(name, "targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetRole_Terms() {
setTargetRole_Terms(null);
}
public void setTargetRole_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda) {
setTargetRole_Terms("targetRole", opLambda, null);
}
public void setTargetRole_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetRole_Terms("targetRole", opLambda, aggsLambda);
}
public void setTargetRole_Terms(String name, ConditionOptionCall<TermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
TermsAggregationBuilder builder = regTermsA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetRole_SignificantTerms() {
setTargetRole_SignificantTerms(null);
}
public void setTargetRole_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda) {
setTargetRole_SignificantTerms("targetRole", opLambda, null);
}
public void setTargetRole_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetRole_SignificantTerms("targetRole", opLambda, aggsLambda);
}
public void setTargetRole_SignificantTerms(String name, ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetRole_IpRange() {
setTargetRole_IpRange(null);
}
public void setTargetRole_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda) {
setTargetRole_IpRange("targetRole", opLambda, null);
}
public void setTargetRole_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetRole_IpRange("targetRole", opLambda, aggsLambda);
}
public void setTargetRole_IpRange(String name, ConditionOptionCall<IpRangeAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
IpRangeAggregationBuilder builder = regIpRangeA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setTargetRole_Count() {
setTargetRole_Count(null);
}
public void setTargetRole_Count(ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
setTargetRole_Count("targetRole", opLambda);
}
public void setTargetRole_Count(String name, ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
ValueCountAggregationBuilder builder = regCountA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Cardinality() {
setTargetRole_Cardinality(null);
}
public void setTargetRole_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
setTargetRole_Cardinality("targetRole", opLambda);
}
public void setTargetRole_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
CardinalityAggregationBuilder builder = regCardinalityA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Missing() {
setTargetRole_Missing(null);
}
public void setTargetRole_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda) {
setTargetRole_Missing("targetRole", opLambda, null);
}
public void setTargetRole_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsElevateWordCA> aggsLambda) {
setTargetRole_Missing("targetRole", opLambda, aggsLambda);
}
public void setTargetRole_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda,
OperatorCall<BsElevateWordCA> aggsLambda) {
MissingAggregationBuilder builder = regMissingA(name, "targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
if (aggsLambda != null) {
ElevateWordCA ca = new ElevateWordCA();
aggsLambda.callback(ca);
ca.getAggregationBuilderList().forEach(builder::subAggregation);
}
}
public void setUpdatedBy_Terms() {
setUpdatedBy_Terms(null);
}

View file

@ -1430,450 +1430,6 @@ public abstract class BsElevateWordCQ extends EsAbstractConditionQuery {
return this;
}
public void setTargetLabel_Equal(String targetLabel) {
setTargetLabel_Term(targetLabel, null);
}
public void setTargetLabel_Equal(String targetLabel, ConditionOptionCall<TermQueryBuilder> opLambda) {
setTargetLabel_Term(targetLabel, opLambda);
}
public void setTargetLabel_Term(String targetLabel) {
setTargetLabel_Term(targetLabel, null);
}
public void setTargetLabel_Term(String targetLabel, ConditionOptionCall<TermQueryBuilder> opLambda) {
TermQueryBuilder builder = regTermQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_NotEqual(String targetLabel) {
setTargetLabel_NotTerm(targetLabel, null);
}
public void setTargetLabel_NotTerm(String targetLabel) {
setTargetLabel_NotTerm(targetLabel, null);
}
public void setTargetLabel_NotEqual(String targetLabel, ConditionOptionCall<BoolQueryBuilder> opLambda) {
setTargetLabel_NotTerm(targetLabel, opLambda);
}
public void setTargetLabel_NotTerm(String targetLabel, ConditionOptionCall<BoolQueryBuilder> opLambda) {
not(not -> not.setTargetLabel_Term(targetLabel), opLambda);
}
public void setTargetLabel_Terms(Collection<String> targetLabelList) {
setTargetLabel_Terms(targetLabelList, null);
}
public void setTargetLabel_Terms(Collection<String> targetLabelList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
TermsQueryBuilder builder = regTermsQ("targetLabel", targetLabelList);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_InScope(Collection<String> targetLabelList) {
setTargetLabel_Terms(targetLabelList, null);
}
public void setTargetLabel_InScope(Collection<String> targetLabelList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
setTargetLabel_Terms(targetLabelList, opLambda);
}
public void setTargetLabel_Match(String targetLabel) {
setTargetLabel_Match(targetLabel, null);
}
public void setTargetLabel_Match(String targetLabel, ConditionOptionCall<MatchQueryBuilder> opLambda) {
MatchQueryBuilder builder = regMatchQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_MatchPhrase(String targetLabel) {
setTargetLabel_MatchPhrase(targetLabel, null);
}
public void setTargetLabel_MatchPhrase(String targetLabel, ConditionOptionCall<MatchPhraseQueryBuilder> opLambda) {
MatchPhraseQueryBuilder builder = regMatchPhraseQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_MatchPhrasePrefix(String targetLabel) {
setTargetLabel_MatchPhrasePrefix(targetLabel, null);
}
public void setTargetLabel_MatchPhrasePrefix(String targetLabel, ConditionOptionCall<MatchPhrasePrefixQueryBuilder> opLambda) {
MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Fuzzy(String targetLabel) {
setTargetLabel_Fuzzy(targetLabel, null);
}
public void setTargetLabel_Fuzzy(String targetLabel, ConditionOptionCall<MatchQueryBuilder> opLambda) {
MatchQueryBuilder builder = regFuzzyQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Prefix(String targetLabel) {
setTargetLabel_Prefix(targetLabel, null);
}
public void setTargetLabel_Prefix(String targetLabel, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
PrefixQueryBuilder builder = regPrefixQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Wildcard(String targetLabel) {
setTargetLabel_Wildcard(targetLabel, null);
}
public void setTargetLabel_Wildcard(String targetLabel, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
WildcardQueryBuilder builder = regWildcardQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Regexp(String targetLabel) {
setTargetLabel_Regexp(targetLabel, null);
}
public void setTargetLabel_Regexp(String targetLabel, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
RegexpQueryBuilder builder = regRegexpQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_SpanTerm(String targetLabel) {
setTargetLabel_SpanTerm("targetLabel", null);
}
public void setTargetLabel_SpanTerm(String targetLabel, ConditionOptionCall<SpanTermQueryBuilder> opLambda) {
SpanTermQueryBuilder builder = regSpanTermQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_GreaterThan(String targetLabel) {
setTargetLabel_GreaterThan(targetLabel, null);
}
public void setTargetLabel_GreaterThan(String targetLabel, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetLabel;
RangeQueryBuilder builder = regRangeQ("targetLabel", ConditionKey.CK_GREATER_THAN, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_LessThan(String targetLabel) {
setTargetLabel_LessThan(targetLabel, null);
}
public void setTargetLabel_LessThan(String targetLabel, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetLabel;
RangeQueryBuilder builder = regRangeQ("targetLabel", ConditionKey.CK_LESS_THAN, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_GreaterEqual(String targetLabel) {
setTargetLabel_GreaterEqual(targetLabel, null);
}
public void setTargetLabel_GreaterEqual(String targetLabel, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetLabel;
RangeQueryBuilder builder = regRangeQ("targetLabel", ConditionKey.CK_GREATER_EQUAL, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_LessEqual(String targetLabel) {
setTargetLabel_LessEqual(targetLabel, null);
}
public void setTargetLabel_LessEqual(String targetLabel, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetLabel;
RangeQueryBuilder builder = regRangeQ("targetLabel", ConditionKey.CK_LESS_EQUAL, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_Exists() {
setTargetLabel_Exists(null);
}
public void setTargetLabel_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
ExistsQueryBuilder builder = regExistsQ("targetLabel");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetLabel_CommonTerms(String targetLabel) {
setTargetLabel_CommonTerms(targetLabel, null);
}
public void setTargetLabel_CommonTerms(String targetLabel, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
CommonTermsQueryBuilder builder = regCommonTermsQ("targetLabel", targetLabel);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public BsElevateWordCQ addOrderBy_TargetLabel_Asc() {
regOBA("targetLabel");
return this;
}
public BsElevateWordCQ addOrderBy_TargetLabel_Desc() {
regOBD("targetLabel");
return this;
}
public void setTargetRole_Equal(String targetRole) {
setTargetRole_Term(targetRole, null);
}
public void setTargetRole_Equal(String targetRole, ConditionOptionCall<TermQueryBuilder> opLambda) {
setTargetRole_Term(targetRole, opLambda);
}
public void setTargetRole_Term(String targetRole) {
setTargetRole_Term(targetRole, null);
}
public void setTargetRole_Term(String targetRole, ConditionOptionCall<TermQueryBuilder> opLambda) {
TermQueryBuilder builder = regTermQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_NotEqual(String targetRole) {
setTargetRole_NotTerm(targetRole, null);
}
public void setTargetRole_NotTerm(String targetRole) {
setTargetRole_NotTerm(targetRole, null);
}
public void setTargetRole_NotEqual(String targetRole, ConditionOptionCall<BoolQueryBuilder> opLambda) {
setTargetRole_NotTerm(targetRole, opLambda);
}
public void setTargetRole_NotTerm(String targetRole, ConditionOptionCall<BoolQueryBuilder> opLambda) {
not(not -> not.setTargetRole_Term(targetRole), opLambda);
}
public void setTargetRole_Terms(Collection<String> targetRoleList) {
setTargetRole_Terms(targetRoleList, null);
}
public void setTargetRole_Terms(Collection<String> targetRoleList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
TermsQueryBuilder builder = regTermsQ("targetRole", targetRoleList);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_InScope(Collection<String> targetRoleList) {
setTargetRole_Terms(targetRoleList, null);
}
public void setTargetRole_InScope(Collection<String> targetRoleList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
setTargetRole_Terms(targetRoleList, opLambda);
}
public void setTargetRole_Match(String targetRole) {
setTargetRole_Match(targetRole, null);
}
public void setTargetRole_Match(String targetRole, ConditionOptionCall<MatchQueryBuilder> opLambda) {
MatchQueryBuilder builder = regMatchQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_MatchPhrase(String targetRole) {
setTargetRole_MatchPhrase(targetRole, null);
}
public void setTargetRole_MatchPhrase(String targetRole, ConditionOptionCall<MatchPhraseQueryBuilder> opLambda) {
MatchPhraseQueryBuilder builder = regMatchPhraseQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_MatchPhrasePrefix(String targetRole) {
setTargetRole_MatchPhrasePrefix(targetRole, null);
}
public void setTargetRole_MatchPhrasePrefix(String targetRole, ConditionOptionCall<MatchPhrasePrefixQueryBuilder> opLambda) {
MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Fuzzy(String targetRole) {
setTargetRole_Fuzzy(targetRole, null);
}
public void setTargetRole_Fuzzy(String targetRole, ConditionOptionCall<MatchQueryBuilder> opLambda) {
MatchQueryBuilder builder = regFuzzyQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Prefix(String targetRole) {
setTargetRole_Prefix(targetRole, null);
}
public void setTargetRole_Prefix(String targetRole, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
PrefixQueryBuilder builder = regPrefixQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Wildcard(String targetRole) {
setTargetRole_Wildcard(targetRole, null);
}
public void setTargetRole_Wildcard(String targetRole, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
WildcardQueryBuilder builder = regWildcardQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Regexp(String targetRole) {
setTargetRole_Regexp(targetRole, null);
}
public void setTargetRole_Regexp(String targetRole, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
RegexpQueryBuilder builder = regRegexpQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_SpanTerm(String targetRole) {
setTargetRole_SpanTerm("targetRole", null);
}
public void setTargetRole_SpanTerm(String targetRole, ConditionOptionCall<SpanTermQueryBuilder> opLambda) {
SpanTermQueryBuilder builder = regSpanTermQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_GreaterThan(String targetRole) {
setTargetRole_GreaterThan(targetRole, null);
}
public void setTargetRole_GreaterThan(String targetRole, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetRole;
RangeQueryBuilder builder = regRangeQ("targetRole", ConditionKey.CK_GREATER_THAN, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_LessThan(String targetRole) {
setTargetRole_LessThan(targetRole, null);
}
public void setTargetRole_LessThan(String targetRole, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetRole;
RangeQueryBuilder builder = regRangeQ("targetRole", ConditionKey.CK_LESS_THAN, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_GreaterEqual(String targetRole) {
setTargetRole_GreaterEqual(targetRole, null);
}
public void setTargetRole_GreaterEqual(String targetRole, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetRole;
RangeQueryBuilder builder = regRangeQ("targetRole", ConditionKey.CK_GREATER_EQUAL, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_LessEqual(String targetRole) {
setTargetRole_LessEqual(targetRole, null);
}
public void setTargetRole_LessEqual(String targetRole, ConditionOptionCall<RangeQueryBuilder> opLambda) {
final Object _value = targetRole;
RangeQueryBuilder builder = regRangeQ("targetRole", ConditionKey.CK_LESS_EQUAL, _value);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_Exists() {
setTargetRole_Exists(null);
}
public void setTargetRole_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
ExistsQueryBuilder builder = regExistsQ("targetRole");
if (opLambda != null) {
opLambda.callback(builder);
}
}
public void setTargetRole_CommonTerms(String targetRole) {
setTargetRole_CommonTerms(targetRole, null);
}
public void setTargetRole_CommonTerms(String targetRole, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
CommonTermsQueryBuilder builder = regCommonTermsQ("targetRole", targetRole);
if (opLambda != null) {
opLambda.callback(builder);
}
}
public BsElevateWordCQ addOrderBy_TargetRole_Asc() {
regOBA("targetRole");
return this;
}
public BsElevateWordCQ addOrderBy_TargetRole_Desc() {
regOBD("targetRole");
return this;
}
public void setUpdatedBy_Equal(String updatedBy) {
setUpdatedBy_Term(updatedBy, null);
}

View file

@ -109,8 +109,7 @@ public class ElevateWord extends BsElevateWord {
public String toString() {
return "ElevateWord [labelTypeIds=" + Arrays.toString(labelTypeIds) + ", labelTypeList=" + labelTypeList + ", boost=" + boost
+ ", createdBy=" + createdBy + ", createdTime=" + createdTime + ", reading=" + reading + ", suggestWord=" + suggestWord
+ ", targetLabel=" + targetLabel + ", targetRole=" + targetRole + ", updatedBy=" + updatedBy + ", updatedTime="
+ updatedTime + ", docMeta=" + docMeta + "]";
+ ", updatedBy=" + updatedBy + ", updatedTime=" + updatedTime + ", docMeta=" + docMeta + "]";
}
}

View file

@ -6,12 +6,6 @@
"reading": {
"type": "keyword"
},
"targetRole": {
"type": "keyword"
},
"targetLabel": {
"type": "keyword"
},
"permissions": {
"type": "keyword"
},