fix #1734 add urlId
This commit is contained in:
parent
463c53bf2a
commit
31ae9e58a6
9 changed files with 387 additions and 0 deletions
|
@ -4,6 +4,9 @@
|
|||
"mappings" : {
|
||||
"click_log" : {
|
||||
"properties" : {
|
||||
"urlId" : {
|
||||
"type" : "keyword"
|
||||
},
|
||||
"docId" : {
|
||||
"type" : "keyword"
|
||||
},
|
||||
|
|
|
@ -93,6 +93,7 @@ public class GoAction extends FessSearchAction {
|
|||
if (userSessionId != null) {
|
||||
final SearchLogHelper searchLogHelper = ComponentUtil.getSearchLogHelper();
|
||||
final ClickLog clickLog = new ClickLog();
|
||||
clickLog.setUrlId((String) doc.get(fessConfig.getIndexFieldId()));
|
||||
clickLog.setUrl(url);
|
||||
clickLog.setRequestedAt(systemHelper.getCurrentTimeAsLocalDateTime());
|
||||
clickLog.setQueryRequestedAt(DfTypeUtil.toLocalDateTime(Long.parseLong(form.rt)));
|
||||
|
|
|
@ -73,6 +73,7 @@ public abstract class BsClickLogBhv extends EsAbstractBehavior<ClickLog, ClickLo
|
|||
protected <RESULT extends ClickLog> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {
|
||||
try {
|
||||
final RESULT result = entityType.newInstance();
|
||||
result.setUrlId(DfTypeUtil.toString(source.get("urlId")));
|
||||
result.setDocId(DfTypeUtil.toString(source.get("docId")));
|
||||
result.setOrder(DfTypeUtil.toInteger(source.get("order")));
|
||||
result.setQueryId(DfTypeUtil.toString(source.get("queryId")));
|
||||
|
|
|
@ -37,6 +37,9 @@ public class BsClickLog extends EsAbstractEntity {
|
|||
// ===================================================================================
|
||||
// Attribute
|
||||
// =========
|
||||
/** urlId */
|
||||
protected String urlId;
|
||||
|
||||
/** docId */
|
||||
protected String docId;
|
||||
|
||||
|
@ -79,6 +82,9 @@ public class BsClickLog extends EsAbstractEntity {
|
|||
@Override
|
||||
public Map<String, Object> toSource() {
|
||||
Map<String, Object> sourceMap = new HashMap<>();
|
||||
if (urlId != null) {
|
||||
addFieldToSource(sourceMap, "urlId", urlId);
|
||||
}
|
||||
if (docId != null) {
|
||||
addFieldToSource(sourceMap, "docId", docId);
|
||||
}
|
||||
|
@ -113,6 +119,7 @@ public class BsClickLog extends EsAbstractEntity {
|
|||
@Override
|
||||
protected String doBuildColumnString(String dm) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(dm).append(urlId);
|
||||
sb.append(dm).append(docId);
|
||||
sb.append(dm).append(order);
|
||||
sb.append(dm).append(queryId);
|
||||
|
@ -130,6 +137,16 @@ public class BsClickLog extends EsAbstractEntity {
|
|||
// ===================================================================================
|
||||
// Accessor
|
||||
// ========
|
||||
public String getUrlId() {
|
||||
checkSpecifiedProperty("urlId");
|
||||
return convertEmptyToNull(urlId);
|
||||
}
|
||||
|
||||
public void setUrlId(String value) {
|
||||
registerModifiedProperty("urlId");
|
||||
this.urlId = value;
|
||||
}
|
||||
|
||||
public String getDocId() {
|
||||
checkSpecifiedProperty("docId");
|
||||
return convertEmptyToNull(docId);
|
||||
|
|
|
@ -79,6 +79,7 @@ public class ClickLogDbm extends AbstractDBMeta {
|
|||
// ---------------
|
||||
protected final Map<String, PropertyGateway> _epgMap = newHashMap();
|
||||
{
|
||||
setupEpg(_epgMap, et -> ((ClickLog) et).getUrlId(), (et, vl) -> ((ClickLog) et).setUrlId(DfTypeUtil.toString(vl)), "urlId");
|
||||
setupEpg(_epgMap, et -> ((ClickLog) et).getDocId(), (et, vl) -> ((ClickLog) et).setDocId(DfTypeUtil.toString(vl)), "docId");
|
||||
setupEpg(_epgMap, et -> ((ClickLog) et).getOrder(), (et, vl) -> ((ClickLog) et).setOrder(DfTypeUtil.toInteger(vl)), "order");
|
||||
setupEpg(_epgMap, et -> ((ClickLog) et).getQueryId(), (et, vl) -> ((ClickLog) et).setQueryId(DfTypeUtil.toString(vl)), "queryId");
|
||||
|
@ -125,6 +126,8 @@ public class ClickLogDbm extends AbstractDBMeta {
|
|||
// ===================================================================================
|
||||
// Column Info
|
||||
// ===========
|
||||
protected final ColumnInfo _columnUrlId = cci("urlId", "urlId", null, null, String.class, "urlId", null, false, false, false,
|
||||
"keyword", 0, 0, null, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnDocId = cci("docId", "docId", null, null, String.class, "docId", null, false, false, false,
|
||||
"keyword", 0, 0, null, null, false, null, null, null, null, null, false);
|
||||
protected final ColumnInfo _columnOrder = cci("order", "order", null, null, Integer.class, "order", null, false, false, false,
|
||||
|
@ -140,6 +143,10 @@ public class ClickLogDbm extends AbstractDBMeta {
|
|||
protected final ColumnInfo _columnUserSessionId = cci("userSessionId", "userSessionId", null, null, String.class, "userSessionId",
|
||||
null, false, false, false, "keyword", 0, 0, null, null, false, null, null, null, null, null, false);
|
||||
|
||||
public ColumnInfo columnUrlId() {
|
||||
return _columnUrlId;
|
||||
}
|
||||
|
||||
public ColumnInfo columnDocId() {
|
||||
return _columnDocId;
|
||||
}
|
||||
|
@ -170,6 +177,7 @@ public class ClickLogDbm extends AbstractDBMeta {
|
|||
|
||||
protected List<ColumnInfo> ccil() {
|
||||
List<ColumnInfo> ls = newArrayList();
|
||||
ls.add(columnUrlId());
|
||||
ls.add(columnDocId());
|
||||
ls.add(columnOrder());
|
||||
ls.add(columnQueryId());
|
||||
|
|
|
@ -176,6 +176,10 @@ public class BsClickLogCB extends EsAbstractConditionBean {
|
|||
doColumn("_id");
|
||||
}
|
||||
|
||||
public void columnUrlId() {
|
||||
doColumn("urlId");
|
||||
}
|
||||
|
||||
public void columnDocId() {
|
||||
doColumn("docId");
|
||||
}
|
||||
|
|
|
@ -108,6 +108,134 @@ public abstract class BsClickLogCA extends EsAbstractConditionAggregation {
|
|||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Terms() {
|
||||
setUrlId_Terms(null);
|
||||
}
|
||||
|
||||
public void setUrlId_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda) {
|
||||
setUrlId_Terms("urlId", opLambda, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
setUrlId_Terms("urlId", opLambda, aggsLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Terms(String name, ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
TermsAggregationBuilder builder = regTermsA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
if (aggsLambda != null) {
|
||||
ClickLogCA ca = new ClickLogCA();
|
||||
aggsLambda.callback(ca);
|
||||
ca.getAggregationBuilderList().forEach(builder::subAggregation);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_SignificantTerms() {
|
||||
setUrlId_SignificantTerms(null);
|
||||
}
|
||||
|
||||
public void setUrlId_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda) {
|
||||
setUrlId_SignificantTerms("urlId", opLambda, null);
|
||||
}
|
||||
|
||||
public void setUrlId_SignificantTerms(ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
|
||||
OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
setUrlId_SignificantTerms("urlId", opLambda, aggsLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_SignificantTerms(String name, ConditionOptionCall<SignificantTermsAggregationBuilder> opLambda,
|
||||
OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
if (aggsLambda != null) {
|
||||
ClickLogCA ca = new ClickLogCA();
|
||||
aggsLambda.callback(ca);
|
||||
ca.getAggregationBuilderList().forEach(builder::subAggregation);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_IpRange() {
|
||||
setUrlId_IpRange(null);
|
||||
}
|
||||
|
||||
public void setUrlId_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda) {
|
||||
setUrlId_IpRange("urlId", opLambda, null);
|
||||
}
|
||||
|
||||
public void setUrlId_IpRange(ConditionOptionCall<IpRangeAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
setUrlId_IpRange("urlId", opLambda, aggsLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_IpRange(String name, ConditionOptionCall<IpRangeAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
IpRangeAggregationBuilder builder = regIpRangeA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
if (aggsLambda != null) {
|
||||
ClickLogCA ca = new ClickLogCA();
|
||||
aggsLambda.callback(ca);
|
||||
ca.getAggregationBuilderList().forEach(builder::subAggregation);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Count() {
|
||||
setUrlId_Count(null);
|
||||
}
|
||||
|
||||
public void setUrlId_Count(ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
|
||||
setUrlId_Count("urlId", opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Count(String name, ConditionOptionCall<ValueCountAggregationBuilder> opLambda) {
|
||||
ValueCountAggregationBuilder builder = regCountA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Cardinality() {
|
||||
setUrlId_Cardinality(null);
|
||||
}
|
||||
|
||||
public void setUrlId_Cardinality(ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
|
||||
setUrlId_Cardinality("urlId", opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Cardinality(String name, ConditionOptionCall<CardinalityAggregationBuilder> opLambda) {
|
||||
CardinalityAggregationBuilder builder = regCardinalityA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Missing() {
|
||||
setUrlId_Missing(null);
|
||||
}
|
||||
|
||||
public void setUrlId_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda) {
|
||||
setUrlId_Missing("urlId", opLambda, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Missing(ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
setUrlId_Missing("urlId", opLambda, aggsLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Missing(String name, ConditionOptionCall<MissingAggregationBuilder> opLambda, OperatorCall<BsClickLogCA> aggsLambda) {
|
||||
MissingAggregationBuilder builder = regMissingA(name, "urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
if (aggsLambda != null) {
|
||||
ClickLogCA ca = new ClickLogCA();
|
||||
aggsLambda.callback(ca);
|
||||
ca.getAggregationBuilderList().forEach(builder::subAggregation);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDocId_Terms() {
|
||||
setDocId_Terms(null);
|
||||
}
|
||||
|
|
|
@ -185,6 +185,228 @@ public abstract class BsClickLogCQ extends EsAbstractConditionQuery {
|
|||
return this;
|
||||
}
|
||||
|
||||
public void setUrlId_Equal(String urlId) {
|
||||
setUrlId_Term(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Equal(String urlId, ConditionOptionCall<TermQueryBuilder> opLambda) {
|
||||
setUrlId_Term(urlId, opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Term(String urlId) {
|
||||
setUrlId_Term(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Term(String urlId, ConditionOptionCall<TermQueryBuilder> opLambda) {
|
||||
TermQueryBuilder builder = regTermQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_NotEqual(String urlId) {
|
||||
setUrlId_NotTerm(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_NotTerm(String urlId) {
|
||||
setUrlId_NotTerm(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_NotEqual(String urlId, ConditionOptionCall<BoolQueryBuilder> opLambda) {
|
||||
setUrlId_NotTerm(urlId, opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_NotTerm(String urlId, ConditionOptionCall<BoolQueryBuilder> opLambda) {
|
||||
not(not -> not.setUrlId_Term(urlId), opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Terms(Collection<String> urlIdList) {
|
||||
setUrlId_Terms(urlIdList, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Terms(Collection<String> urlIdList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
|
||||
TermsQueryBuilder builder = regTermsQ("urlId", urlIdList);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_InScope(Collection<String> urlIdList) {
|
||||
setUrlId_Terms(urlIdList, null);
|
||||
}
|
||||
|
||||
public void setUrlId_InScope(Collection<String> urlIdList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
|
||||
setUrlId_Terms(urlIdList, opLambda);
|
||||
}
|
||||
|
||||
public void setUrlId_Match(String urlId) {
|
||||
setUrlId_Match(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Match(String urlId, ConditionOptionCall<MatchQueryBuilder> opLambda) {
|
||||
MatchQueryBuilder builder = regMatchQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_MatchPhrase(String urlId) {
|
||||
setUrlId_MatchPhrase(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_MatchPhrase(String urlId, ConditionOptionCall<MatchPhraseQueryBuilder> opLambda) {
|
||||
MatchPhraseQueryBuilder builder = regMatchPhraseQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_MatchPhrasePrefix(String urlId) {
|
||||
setUrlId_MatchPhrasePrefix(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_MatchPhrasePrefix(String urlId, ConditionOptionCall<MatchPhrasePrefixQueryBuilder> opLambda) {
|
||||
MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Fuzzy(String urlId) {
|
||||
setUrlId_Fuzzy(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Fuzzy(String urlId, ConditionOptionCall<MatchQueryBuilder> opLambda) {
|
||||
MatchQueryBuilder builder = regFuzzyQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Prefix(String urlId) {
|
||||
setUrlId_Prefix(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Prefix(String urlId, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
|
||||
PrefixQueryBuilder builder = regPrefixQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Wildcard(String urlId) {
|
||||
setUrlId_Wildcard(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Wildcard(String urlId, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
|
||||
WildcardQueryBuilder builder = regWildcardQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Regexp(String urlId) {
|
||||
setUrlId_Regexp(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_Regexp(String urlId, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
|
||||
RegexpQueryBuilder builder = regRegexpQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_SpanTerm(String urlId) {
|
||||
setUrlId_SpanTerm("urlId", null);
|
||||
}
|
||||
|
||||
public void setUrlId_SpanTerm(String urlId, ConditionOptionCall<SpanTermQueryBuilder> opLambda) {
|
||||
SpanTermQueryBuilder builder = regSpanTermQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_GreaterThan(String urlId) {
|
||||
setUrlId_GreaterThan(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_GreaterThan(String urlId, ConditionOptionCall<RangeQueryBuilder> opLambda) {
|
||||
final Object _value = urlId;
|
||||
RangeQueryBuilder builder = regRangeQ("urlId", ConditionKey.CK_GREATER_THAN, _value);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_LessThan(String urlId) {
|
||||
setUrlId_LessThan(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_LessThan(String urlId, ConditionOptionCall<RangeQueryBuilder> opLambda) {
|
||||
final Object _value = urlId;
|
||||
RangeQueryBuilder builder = regRangeQ("urlId", ConditionKey.CK_LESS_THAN, _value);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_GreaterEqual(String urlId) {
|
||||
setUrlId_GreaterEqual(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_GreaterEqual(String urlId, ConditionOptionCall<RangeQueryBuilder> opLambda) {
|
||||
final Object _value = urlId;
|
||||
RangeQueryBuilder builder = regRangeQ("urlId", ConditionKey.CK_GREATER_EQUAL, _value);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_LessEqual(String urlId) {
|
||||
setUrlId_LessEqual(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_LessEqual(String urlId, ConditionOptionCall<RangeQueryBuilder> opLambda) {
|
||||
final Object _value = urlId;
|
||||
RangeQueryBuilder builder = regRangeQ("urlId", ConditionKey.CK_LESS_EQUAL, _value);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_Exists() {
|
||||
setUrlId_Exists(null);
|
||||
}
|
||||
|
||||
public void setUrlId_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
|
||||
ExistsQueryBuilder builder = regExistsQ("urlId");
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUrlId_CommonTerms(String urlId) {
|
||||
setUrlId_CommonTerms(urlId, null);
|
||||
}
|
||||
|
||||
public void setUrlId_CommonTerms(String urlId, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
|
||||
CommonTermsQueryBuilder builder = regCommonTermsQ("urlId", urlId);
|
||||
if (opLambda != null) {
|
||||
opLambda.callback(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public BsClickLogCQ addOrderBy_UrlId_Asc() {
|
||||
regOBA("urlId");
|
||||
return this;
|
||||
}
|
||||
|
||||
public BsClickLogCQ addOrderBy_UrlId_Desc() {
|
||||
regOBD("urlId");
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDocId_Equal(String docId) {
|
||||
setDocId_Term(docId, null);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
"enabled": true
|
||||
},
|
||||
"properties": {
|
||||
"urlId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"docId": {
|
||||
"type": "keyword"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue