diff --git a/src/main/config/es/fess_log.json b/src/main/config/es/fess_log.json index ea0d5bfac..f5919cc3a 100644 --- a/src/main/config/es/fess_log.json +++ b/src/main/config/es/fess_log.json @@ -1,26 +1,6 @@ { "fess_log" : { "mappings" : { - "search_field_log" : { - "_all" : { - "enabled" : false - }, - "properties" : { - "name" : { - "type": "keyword" - }, - "searchLogId" : { - "type": "keyword" - }, - "value" : { - "type": "keyword" - }, - "requestedAt" : { - "type" : "date", - "format" : "date_optional_time" - } - } - }, "favorite_log" : { "_all" : { "enabled" : false @@ -130,6 +110,9 @@ }, "languages" : { "type": "keyword" + }, + "virtualHost" : { + "type": "keyword" } } }, diff --git a/src/main/java/org/codelibs/fess/app/service/SearchLogService.java b/src/main/java/org/codelibs/fess/app/service/SearchLogService.java index 41577c869..325aa02fc 100644 --- a/src/main/java/org/codelibs/fess/app/service/SearchLogService.java +++ b/src/main/java/org/codelibs/fess/app/service/SearchLogService.java @@ -17,7 +17,6 @@ package org.codelibs.fess.app.service; import javax.annotation.Resource; -import org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv; import org.codelibs.fess.es.log.exbhv.SearchLogBhv; import org.codelibs.fess.helper.SystemHelper; @@ -26,20 +25,10 @@ public class SearchLogService { @Resource private SearchLogBhv searchLogBhv; - @Resource - private SearchFieldLogBhv searchFieldLogBhv; - @Resource private SystemHelper systemHelper; public void deleteBefore(final int days) { - searchLogBhv.selectCursor(cb -> { - cb.query().setRequestedAt_LessEqual(systemHelper.getCurrentTimeAsLocalDateTime().minusDays(days)); - }, entity -> { - searchFieldLogBhv.queryDelete(subCb -> { - subCb.query().setSearchLogId_Equal(entity.getId()); - }); - }); searchLogBhv.queryDelete(cb -> { cb.query().setRequestedAt_LessEqual(systemHelper.getCurrentTimeAsLocalDateTime().minusDays(days)); }); diff --git a/src/main/java/org/codelibs/fess/app/web/admin/backup/AdminBackupAction.java b/src/main/java/org/codelibs/fess/app/web/admin/backup/AdminBackupAction.java index 4698c0f26..45f7c17a6 100644 --- a/src/main/java/org/codelibs/fess/app/web/admin/backup/AdminBackupAction.java +++ b/src/main/java/org/codelibs/fess/app/web/admin/backup/AdminBackupAction.java @@ -43,7 +43,6 @@ import org.codelibs.elasticsearch.runner.net.CurlResponse; import org.codelibs.fess.app.web.base.FessAdminAction; import org.codelibs.fess.es.log.exbhv.ClickLogBhv; import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv; -import org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv; import org.codelibs.fess.es.log.exbhv.SearchLogBhv; import org.codelibs.fess.es.log.exbhv.UserInfoBhv; import org.codelibs.fess.mylasta.direction.FessConfig; @@ -141,8 +140,6 @@ public class AdminBackupAction extends FessAdminAction { final String name = id.substring(0, id.length() - CSV_EXTENTION.length()); if ("search_log".equals(name)) { return writeCsvResponse(id, getSearchLogCsvWriteCall()); - } else if ("search_field_log".equals(name)) { - return writeCsvResponse(id, getSearchFieldLogCsvWriteCall()); } else if ("user_info".equals(name)) { return writeCsvResponse(id, getUserInfoCsvWriteCall()); } else if ("click_log".equals(name)) { @@ -295,26 +292,6 @@ public class AdminBackupAction extends FessAdminAction { }; } - public static Consumer getSearchFieldLogCsvWriteCall() { - return writer -> { - final SearchFieldLogBhv bhv = ComponentUtil.getComponent(SearchFieldLogBhv.class); - bhv.selectCursor(cb -> { - cb.query().matchAll(); - cb.query().addOrderBy_SearchLogId_Asc(); - }, entity -> { - final List list = new ArrayList<>(); - addToList(entity.getSearchLogId(), list); - addToList(entity.getName(), list); - addToList(entity.getValue(), list); - try { - writer.writeValues(list); - } catch (final IOException e) { - throw new RuntimeIOException(e); - } - }); - }; - } - private static void addToList(final Object value, final List list) { if (value == null) { list.add(StringUtil.EMPTY); diff --git a/src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java b/src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java index 28a71a3e8..632b679b2 100644 --- a/src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java +++ b/src/main/java/org/codelibs/fess/app/web/api/admin/backup/ApiAdminBackupAction.java @@ -20,7 +20,6 @@ import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.CSV_EXTEN import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getBackupItems; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getClickLogCsvWriteCall; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getFavoriteLogCsvWriteCall; -import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getSearchFieldLogCsvWriteCall; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getSearchLogCsvWriteCall; import static org.codelibs.fess.app.web.admin.backup.AdminBackupAction.getUserInfoCsvWriteCall; @@ -78,8 +77,6 @@ public class ApiAdminBackupAction extends FessApiAdminAction { final String name = id.substring(0, id.length() - CSV_EXTENTION.length()); if ("search_log".equals(name)) { return writeCsvResponse(id, getSearchLogCsvWriteCall()); - } else if ("search_field_log".equals(name)) { - return writeCsvResponse(id, getSearchFieldLogCsvWriteCall()); } else if ("user_info".equals(name)) { return writeCsvResponse(id, getUserInfoCsvWriteCall()); } else if ("click_log".equals(name)) { diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java deleted file mode 100644 index 5da30bb11..000000000 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchFieldLogBhv.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.bsbhv; - -import java.util.List; -import java.util.Map; - -import org.codelibs.fess.es.log.allcommon.EsAbstractBehavior; -import org.codelibs.fess.es.log.allcommon.EsAbstractEntity.RequestOptionCall; -import org.codelibs.fess.es.log.bsentity.dbmeta.SearchFieldLogDbm; -import org.codelibs.fess.es.log.cbean.SearchFieldLogCB; -import org.codelibs.fess.es.log.exentity.SearchFieldLog; -import org.dbflute.Entity; -import org.dbflute.bhv.readable.CBCall; -import org.dbflute.bhv.readable.EntityRowHandler; -import org.dbflute.cbean.ConditionBean; -import org.dbflute.cbean.result.ListResultBean; -import org.dbflute.cbean.result.PagingResultBean; -import org.dbflute.exception.IllegalBehaviorStateException; -import org.dbflute.optional.OptionalEntity; -import org.dbflute.util.DfTypeUtil; -import org.elasticsearch.action.bulk.BulkRequestBuilder; -import org.elasticsearch.action.delete.DeleteRequestBuilder; -import org.elasticsearch.action.index.IndexRequestBuilder; - -/** - * @author ESFlute (using FreeGen) - */ -public abstract class BsSearchFieldLogBhv extends EsAbstractBehavior { - - // =================================================================================== - // Control Override - // ================ - @Override - public String asTableDbName() { - return asEsIndexType(); - } - - @Override - protected String asEsIndex() { - return "fess_log"; - } - - @Override - public String asEsIndexType() { - return "search_field_log"; - } - - @Override - public String asEsSearchType() { - return "search_field_log"; - } - - @Override - public SearchFieldLogDbm asDBMeta() { - return SearchFieldLogDbm.getInstance(); - } - - @Override - protected RESULT createEntity(Map source, Class entityType) { - try { - final RESULT result = entityType.newInstance(); - result.setName(DfTypeUtil.toString(source.get("name"))); - result.setSearchLogId(DfTypeUtil.toString(source.get("searchLogId"))); - result.setValue(DfTypeUtil.toString(source.get("value"))); - result.setRequestedAt(toLocalDateTime(source.get("requestedAt"))); - return updateEntity(source, result); - } catch (InstantiationException | IllegalAccessException e) { - final String msg = "Cannot create a new instance: " + entityType.getName(); - throw new IllegalBehaviorStateException(msg, e); - } - } - - protected RESULT updateEntity(Map source, RESULT result) { - return result; - } - - // =================================================================================== - // Select - // ====== - public int selectCount(CBCall cbLambda) { - return facadeSelectCount(createCB(cbLambda)); - } - - public OptionalEntity selectEntity(CBCall cbLambda) { - return facadeSelectEntity(createCB(cbLambda)); - } - - protected OptionalEntity facadeSelectEntity(SearchFieldLogCB cb) { - return doSelectOptionalEntity(cb, typeOfSelectedEntity()); - } - - protected OptionalEntity doSelectOptionalEntity(SearchFieldLogCB cb, Class tp) { - return createOptionalEntity(doSelectEntity(cb, tp), cb); - } - - @Override - public SearchFieldLogCB newConditionBean() { - return new SearchFieldLogCB(); - } - - @Override - protected Entity doReadEntity(ConditionBean cb) { - return facadeSelectEntity(downcast(cb)).orElse(null); - } - - public SearchFieldLog selectEntityWithDeletedCheck(CBCall cbLambda) { - return facadeSelectEntityWithDeletedCheck(createCB(cbLambda)); - } - - public OptionalEntity selectByPK(String id) { - return facadeSelectByPK(id); - } - - protected OptionalEntity facadeSelectByPK(String id) { - return doSelectOptionalByPK(id, typeOfSelectedEntity()); - } - - protected ENTITY doSelectByPK(String id, Class tp) { - return doSelectEntity(xprepareCBAsPK(id), tp); - } - - protected SearchFieldLogCB xprepareCBAsPK(String id) { - assertObjectNotNull("id", id); - return newConditionBean().acceptPK(id); - } - - protected OptionalEntity doSelectOptionalByPK(String id, Class tp) { - return createOptionalEntity(doSelectByPK(id, tp), id); - } - - @Override - protected Class typeOfSelectedEntity() { - return SearchFieldLog.class; - } - - @Override - protected Class typeOfHandlingEntity() { - return SearchFieldLog.class; - } - - @Override - protected Class typeOfHandlingConditionBean() { - return SearchFieldLogCB.class; - } - - public ListResultBean selectList(CBCall cbLambda) { - return facadeSelectList(createCB(cbLambda)); - } - - public PagingResultBean selectPage(CBCall cbLambda) { - // #pending same? - return (PagingResultBean) facadeSelectList(createCB(cbLambda)); - } - - public void selectCursor(CBCall cbLambda, EntityRowHandler entityLambda) { - facadeSelectCursor(createCB(cbLambda), entityLambda); - } - - public void selectBulk(CBCall cbLambda, EntityRowHandler> entityLambda) { - delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity()); - } - - // =================================================================================== - // Update - // ====== - public void insert(SearchFieldLog entity) { - doInsert(entity, null); - } - - public void insert(SearchFieldLog entity, RequestOptionCall opLambda) { - entity.asDocMeta().indexOption(opLambda); - doInsert(entity, null); - } - - public void update(SearchFieldLog entity) { - doUpdate(entity, null); - } - - public void update(SearchFieldLog entity, RequestOptionCall opLambda) { - entity.asDocMeta().indexOption(opLambda); - doUpdate(entity, null); - } - - public void insertOrUpdate(SearchFieldLog entity) { - doInsertOrUpdate(entity, null, null); - } - - public void insertOrUpdate(SearchFieldLog entity, RequestOptionCall opLambda) { - entity.asDocMeta().indexOption(opLambda); - doInsertOrUpdate(entity, null, null); - } - - public void delete(SearchFieldLog entity) { - doDelete(entity, null); - } - - public void delete(SearchFieldLog entity, RequestOptionCall opLambda) { - entity.asDocMeta().deleteOption(opLambda); - doDelete(entity, null); - } - - public int queryDelete(CBCall cbLambda) { - return doQueryDelete(createCB(cbLambda), null); - } - - public int[] batchInsert(List list) { - return batchInsert(list, null, null); - } - - public int[] batchInsert(List list, RequestOptionCall call) { - return batchInsert(list, call, null); - } - - public int[] batchInsert(List list, RequestOptionCall call, - RequestOptionCall entityCall) { - return doBatchInsert(new BulkList<>(list, call, entityCall), null); - } - - public int[] batchUpdate(List list) { - return batchUpdate(list, null, null); - } - - public int[] batchUpdate(List list, RequestOptionCall call) { - return batchUpdate(list, call, null); - } - - public int[] batchUpdate(List list, RequestOptionCall call, - RequestOptionCall entityCall) { - return doBatchUpdate(new BulkList<>(list, call, entityCall), null); - } - - public int[] batchDelete(List list) { - return batchDelete(list, null, null); - } - - public int[] batchDelete(List list, RequestOptionCall call) { - return batchDelete(list, call, null); - } - - public int[] batchDelete(List list, RequestOptionCall call, - RequestOptionCall entityCall) { - return doBatchDelete(new BulkList<>(list, call, entityCall), null); - } - - // #pending create, modify, remove -} diff --git a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java index 6f513abaa..a059a2427 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/bsbhv/BsSearchLogBhv.java @@ -90,6 +90,7 @@ public abstract class BsSearchLogBhv extends EsAbstractBehavior suppressUnusedImportLocalDateTime = LocalDateTime.class; - - // =================================================================================== - // Attribute - // ========= - /** name */ - protected String name; - - /** searchLogId */ - protected String searchLogId; - - /** value */ - protected String value; - - /** requestedAt */ - protected LocalDateTime requestedAt; - - // [Referrers] *comment only - - // =================================================================================== - // DB Meta - // ======= - @Override - public SearchFieldLogDbm asDBMeta() { - return SearchFieldLogDbm.getInstance(); - } - - @Override - public String asTableDbName() { - return "search_field_log"; - } - - // =================================================================================== - // Source - // ====== - @Override - public Map toSource() { - Map sourceMap = new HashMap<>(); - if (name != null) { - addFieldToSource(sourceMap, "name", name); - } - if (searchLogId != null) { - addFieldToSource(sourceMap, "searchLogId", searchLogId); - } - if (value != null) { - addFieldToSource(sourceMap, "value", value); - } - if (requestedAt != null) { - addFieldToSource(sourceMap, "requestedAt", requestedAt); - } - return sourceMap; - } - - protected void addFieldToSource(Map sourceMap, String field, Object value) { - sourceMap.put(field, value); - } - - // =================================================================================== - // Basic Override - // ============== - @Override - protected String doBuildColumnString(String dm) { - StringBuilder sb = new StringBuilder(); - sb.append(dm).append(name); - sb.append(dm).append(searchLogId); - sb.append(dm).append(value); - sb.append(dm).append(requestedAt); - if (sb.length() > dm.length()) { - sb.delete(0, dm.length()); - } - sb.insert(0, "{").append("}"); - return sb.toString(); - } - - // =================================================================================== - // Accessor - // ======== - public String getName() { - checkSpecifiedProperty("name"); - return convertEmptyToNull(name); - } - - public void setName(String value) { - registerModifiedProperty("name"); - this.name = value; - } - - public String getSearchLogId() { - checkSpecifiedProperty("searchLogId"); - return convertEmptyToNull(searchLogId); - } - - public void setSearchLogId(String value) { - registerModifiedProperty("searchLogId"); - this.searchLogId = value; - } - - public String getValue() { - checkSpecifiedProperty("value"); - return convertEmptyToNull(value); - } - - public void setValue(String value) { - registerModifiedProperty("value"); - this.value = value; - } - - public LocalDateTime getRequestedAt() { - checkSpecifiedProperty("requestedAt"); - return requestedAt; - } - - public void setRequestedAt(LocalDateTime value) { - registerModifiedProperty("requestedAt"); - this.requestedAt = value; - } -} diff --git a/src/main/java/org/codelibs/fess/es/log/bsentity/BsSearchLog.java b/src/main/java/org/codelibs/fess/es/log/bsentity/BsSearchLog.java index b72854611..a2d6eaab2 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsentity/BsSearchLog.java +++ b/src/main/java/org/codelibs/fess/es/log/bsentity/BsSearchLog.java @@ -88,6 +88,9 @@ public class BsSearchLog extends EsAbstractEntity { /** languages */ protected String languages; + /** virtualHost */ + protected String virtualHost; + // [Referrers] *comment only // =================================================================================== @@ -160,6 +163,9 @@ public class BsSearchLog extends EsAbstractEntity { if (languages != null) { addFieldToSource(sourceMap, "languages", languages); } + if (virtualHost != null) { + addFieldToSource(sourceMap, "virtualHost", virtualHost); + } return sourceMap; } @@ -190,6 +196,7 @@ public class BsSearchLog extends EsAbstractEntity { sb.append(dm).append(userInfoId); sb.append(dm).append(userSessionId); sb.append(dm).append(languages); + sb.append(dm).append(virtualHost); if (sb.length() > dm.length()) { sb.delete(0, dm.length()); } @@ -369,4 +376,14 @@ public class BsSearchLog extends EsAbstractEntity { registerModifiedProperty("languages"); this.languages = value; } + + public String getVirtualHost() { + checkSpecifiedProperty("virtualHost"); + return convertEmptyToNull(virtualHost); + } + + public void setVirtualHost(String value) { + registerModifiedProperty("virtualHost"); + this.virtualHost = value; + } } diff --git a/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchFieldLogDbm.java b/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchFieldLogDbm.java deleted file mode 100644 index fcfa43004..000000000 --- a/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchFieldLogDbm.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.bsentity.dbmeta; - -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -import org.codelibs.fess.es.log.exentity.SearchFieldLog; -import org.dbflute.Entity; -import org.dbflute.dbmeta.AbstractDBMeta; -import org.dbflute.dbmeta.info.ColumnInfo; -import org.dbflute.dbmeta.info.UniqueInfo; -import org.dbflute.dbmeta.name.TableSqlName; -import org.dbflute.dbmeta.property.PropertyGateway; -import org.dbflute.dbway.DBDef; -import org.dbflute.util.DfTypeUtil; - -/** - * @author ESFlute (using FreeGen) - */ -public class SearchFieldLogDbm extends AbstractDBMeta { - - protected static final Class suppressUnusedImportLocalDateTime = LocalDateTime.class; - - // =================================================================================== - // Singleton - // ========= - private static final SearchFieldLogDbm _instance = new SearchFieldLogDbm(); - - private SearchFieldLogDbm() { - } - - public static SearchFieldLogDbm getInstance() { - return _instance; - } - - // =================================================================================== - // Current DBDef - // ============= - @Override - public String getProjectName() { - return null; - } - - @Override - public String getProjectPrefix() { - return null; - } - - @Override - public String getGenerationGapBasePrefix() { - return null; - } - - @Override - public DBDef getCurrentDBDef() { - return null; - } - - // =================================================================================== - // Property Gateway - // ================ - // ----------------------------------------------------- - // Column Property - // --------------- - protected final Map _epgMap = newHashMap(); - { - setupEpg(_epgMap, et -> ((SearchFieldLog) et).getName(), (et, vl) -> ((SearchFieldLog) et).setName(DfTypeUtil.toString(vl)), "name"); - setupEpg(_epgMap, et -> ((SearchFieldLog) et).getSearchLogId(), - (et, vl) -> ((SearchFieldLog) et).setSearchLogId(DfTypeUtil.toString(vl)), "searchLogId"); - setupEpg(_epgMap, et -> ((SearchFieldLog) et).getValue(), (et, vl) -> ((SearchFieldLog) et).setValue(DfTypeUtil.toString(vl)), - "value"); - setupEpg(_epgMap, et -> ((SearchFieldLog) et).getRequestedAt(), - (et, vl) -> ((SearchFieldLog) et).setRequestedAt(DfTypeUtil.toLocalDateTime(vl)), "requestedAt"); - } - - @Override - public PropertyGateway findPropertyGateway(final String prop) { - return doFindEpg(_epgMap, prop); - } - - // =================================================================================== - // Table Info - // ========== - protected final String _tableDbName = "search_field_log"; - protected final String _tableDispName = "search_field_log"; - protected final String _tablePropertyName = "SearchFieldLog"; - - public String getTableDbName() { - return _tableDbName; - } - - @Override - public String getTableDispName() { - return _tableDispName; - } - - @Override - public String getTablePropertyName() { - return _tablePropertyName; - } - - @Override - public TableSqlName getTableSqlName() { - return null; - } - - // =================================================================================== - // Column Info - // =========== - protected final ColumnInfo _columnName = cci("name", "name", null, null, String.class, "name", null, false, false, false, "keyword", 0, - 0, null, false, null, null, null, null, null, false); - protected final ColumnInfo _columnSearchLogId = cci("searchLogId", "searchLogId", null, null, String.class, "searchLogId", null, false, - false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false); - protected final ColumnInfo _columnValue = cci("value", "value", null, null, String.class, "value", null, false, false, false, - "keyword", 0, 0, null, false, null, null, null, null, null, false); - protected final ColumnInfo _columnRequestedAt = cci("requestedAt", "requestedAt", null, null, LocalDateTime.class, "requestedAt", null, - false, false, false, "LocalDateTime", 0, 0, null, false, null, null, null, null, null, false); - - public ColumnInfo columnName() { - return _columnName; - } - - public ColumnInfo columnSearchLogId() { - return _columnSearchLogId; - } - - public ColumnInfo columnValue() { - return _columnValue; - } - - public ColumnInfo columnRequestedAt() { - return _columnRequestedAt; - } - - protected List ccil() { - List ls = newArrayList(); - ls.add(columnName()); - ls.add(columnSearchLogId()); - ls.add(columnValue()); - ls.add(columnRequestedAt()); - return ls; - } - - // =================================================================================== - // Unique Info - // =========== - @Override - public boolean hasPrimaryKey() { - return false; - } - - @Override - public boolean hasCompoundPrimaryKey() { - return false; - } - - @Override - protected UniqueInfo cpui() { - return null; - } - - // =================================================================================== - // Type Name - // ========= - @Override - public String getEntityTypeName() { - return "org.codelibs.fess.es.log.exentity.SearchFieldLog"; - } - - @Override - public String getConditionBeanTypeName() { - return "org.codelibs.fess.es.log.cbean.SearchFieldLogCB"; - } - - @Override - public String getBehaviorTypeName() { - return "org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv"; - } - - // =================================================================================== - // Object Type - // =========== - @Override - public Class getEntityType() { - return SearchFieldLog.class; - } - - // =================================================================================== - // Object Instance - // =============== - @Override - public Entity newEntity() { - return new SearchFieldLog(); - } - - // =================================================================================== - // Map Communication - // ================= - @Override - public void acceptPrimaryKeyMap(Entity entity, Map primaryKeyMap) { - } - - @Override - public void acceptAllColumnMap(Entity entity, Map allColumnMap) { - } - - @Override - public Map extractPrimaryKeyMap(Entity entity) { - return null; - } - - @Override - public Map extractAllColumnMap(Entity entity) { - return null; - } -} diff --git a/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchLogDbm.java b/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchLogDbm.java index eec8cf720..7b840f0e3 100644 --- a/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchLogDbm.java +++ b/src/main/java/org/codelibs/fess/es/log/bsentity/dbmeta/SearchLogDbm.java @@ -108,6 +108,8 @@ public class SearchLogDbm extends AbstractDBMeta { (et, vl) -> ((SearchLog) et).setUserSessionId(DfTypeUtil.toString(vl)), "userSessionId"); setupEpg(_epgMap, et -> ((SearchLog) et).getLanguages(), (et, vl) -> ((SearchLog) et).setLanguages(DfTypeUtil.toString(vl)), "languages"); + setupEpg(_epgMap, et -> ((SearchLog) et).getVirtualHost(), (et, vl) -> ((SearchLog) et).setVirtualHost(DfTypeUtil.toString(vl)), + "virtualHost"); } @Override @@ -178,6 +180,8 @@ public class SearchLogDbm extends AbstractDBMeta { null, false, false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false); protected final ColumnInfo _columnLanguages = cci("languages", "languages", null, null, String.class, "languages", null, false, false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false); + protected final ColumnInfo _columnVirtualHost = cci("virtualHost", "virtualHost", null, null, String.class, "virtualHost", null, false, + false, false, "keyword", 0, 0, null, false, null, null, null, null, null, false); public ColumnInfo columnAccessType() { return _columnAccessType; @@ -247,6 +251,10 @@ public class SearchLogDbm extends AbstractDBMeta { return _columnLanguages; } + public ColumnInfo columnVirtualHost() { + return _columnVirtualHost; + } + protected List ccil() { List ls = newArrayList(); ls.add(columnAccessType()); @@ -266,6 +274,7 @@ public class SearchLogDbm extends AbstractDBMeta { ls.add(columnUserInfoId()); ls.add(columnUserSessionId()); ls.add(columnLanguages()); + ls.add(columnVirtualHost()); return ls; } diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/SearchFieldLogCB.java b/src/main/java/org/codelibs/fess/es/log/cbean/SearchFieldLogCB.java deleted file mode 100644 index 03de030a4..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/SearchFieldLogCB.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean; - -import org.codelibs.fess.es.log.cbean.bs.BsSearchFieldLogCB; - -/** - * @author ESFlute (using FreeGen) - */ -public class SearchFieldLogCB extends BsSearchFieldLogCB { -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchFieldLogCB.java b/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchFieldLogCB.java deleted file mode 100644 index 63b77f4eb..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchFieldLogCB.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean.bs; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.codelibs.fess.es.log.allcommon.EsAbstractConditionBean; -import org.codelibs.fess.es.log.bsentity.dbmeta.SearchFieldLogDbm; -import org.codelibs.fess.es.log.cbean.SearchFieldLogCB; -import org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA; -import org.codelibs.fess.es.log.cbean.ca.bs.BsSearchFieldLogCA; -import org.codelibs.fess.es.log.cbean.cq.SearchFieldLogCQ; -import org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ; -import org.dbflute.cbean.ConditionQuery; -import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.index.query.QueryBuilder; - -/** - * @author ESFlute (using FreeGen) - */ -public class BsSearchFieldLogCB extends EsAbstractConditionBean { - - // =================================================================================== - // Attribute - // ========= - protected BsSearchFieldLogCQ _conditionQuery; - protected BsSearchFieldLogCA _conditionAggregation; - protected HpSpecification _specification; - - // =================================================================================== - // Control - // ======= - @Override - public SearchFieldLogDbm asDBMeta() { - return SearchFieldLogDbm.getInstance(); - } - - @Override - public String asTableDbName() { - return "search_field_log"; - } - - @Override - public boolean hasSpecifiedColumn() { - return _specification != null; - } - - @Override - public ConditionQuery localCQ() { - return doGetConditionQuery(); - } - - // =================================================================================== - // Primary Key - // =========== - public SearchFieldLogCB acceptPK(String id) { - assertObjectNotNull("id", id); - BsSearchFieldLogCB cb = this; - cb.query().docMeta().setId_Equal(id); - return (SearchFieldLogCB) this; - } - - @Override - public void acceptPrimaryKeyMap(Map primaryKeyMap) { - acceptPK((String) primaryKeyMap.get("_id")); - } - - // =================================================================================== - // Build - // ===== - - @Override - public SearchRequestBuilder build(SearchRequestBuilder builder) { - if (_conditionQuery != null) { - QueryBuilder queryBuilder = _conditionQuery.getQuery(); - if (queryBuilder != null) { - builder.setQuery(queryBuilder); - } - _conditionQuery.getFieldSortBuilderList().forEach(sort -> { - builder.addSort(sort); - }); - } - - if (_conditionAggregation != null) { - _conditionAggregation.getAggregationBuilderList().forEach(builder::addAggregation); - } - - if (_specification != null) { - builder.setFetchSource(_specification.columnList.toArray(new String[_specification.columnList.size()]), null); - } - - return builder; - } - - // =================================================================================== - // Query - // ===== - public BsSearchFieldLogCQ query() { - assertQueryPurpose(); - return doGetConditionQuery(); - } - - protected BsSearchFieldLogCQ doGetConditionQuery() { - if (_conditionQuery == null) { - _conditionQuery = createLocalCQ(); - } - return _conditionQuery; - } - - protected BsSearchFieldLogCQ createLocalCQ() { - return new SearchFieldLogCQ(); - } - - // =================================================================================== - // Aggregation - // =========== - public BsSearchFieldLogCA aggregation() { - assertAggregationPurpose(); - return doGetConditionAggregation(); - } - - protected BsSearchFieldLogCA doGetConditionAggregation() { - if (_conditionAggregation == null) { - _conditionAggregation = createLocalCA(); - } - return _conditionAggregation; - } - - protected BsSearchFieldLogCA createLocalCA() { - return new SearchFieldLogCA(); - } - - // =================================================================================== - // Specify - // ======= - public HpSpecification specify() { - assertSpecifyPurpose(); - if (_specification == null) { - _specification = new HpSpecification(); - } - return _specification; - } - - protected void assertQueryPurpose() { - } - - protected void assertAggregationPurpose() { - } - - protected void assertSpecifyPurpose() { - } - - public static class HpSpecification { - private List columnList = new ArrayList<>(); - - private void doColumn(String name) { - columnList.add(name); - } - - public void columnId() { - doColumn("_id"); - } - - public void columnName() { - doColumn("name"); - } - - public void columnSearchLogId() { - doColumn("searchLogId"); - } - - public void columnValue() { - doColumn("value"); - } - - public void columnRequestedAt() { - doColumn("requestedAt"); - } - } -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchLogCB.java b/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchLogCB.java index 6407c2d4b..18d61954b 100644 --- a/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchLogCB.java +++ b/src/main/java/org/codelibs/fess/es/log/cbean/bs/BsSearchLogCB.java @@ -243,5 +243,9 @@ public class BsSearchLogCB extends EsAbstractConditionBean { public void columnLanguages() { doColumn("languages"); } + + public void columnVirtualHost() { + doColumn("virtualHost"); + } } } diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/ca/SearchFieldLogCA.java b/src/main/java/org/codelibs/fess/es/log/cbean/ca/SearchFieldLogCA.java deleted file mode 100644 index 84e5aa2dd..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/ca/SearchFieldLogCA.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean.ca; - -import org.codelibs.fess.es.log.cbean.ca.bs.BsSearchFieldLogCA; - -/** - * @author ESFlute (using FreeGen) - */ -public class SearchFieldLogCA extends BsSearchFieldLogCA { -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchFieldLogCA.java b/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchFieldLogCA.java deleted file mode 100644 index 9de49c8e8..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchFieldLogCA.java +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean.ca.bs; - -import org.codelibs.fess.es.log.allcommon.EsAbstractConditionAggregation; -import org.codelibs.fess.es.log.allcommon.EsAbstractConditionQuery; -import org.codelibs.fess.es.log.cbean.ca.SearchFieldLogCA; -import org.codelibs.fess.es.log.cbean.cq.SearchFieldLogCQ; -import org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ; -import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.range.date.DateRangeAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.range.ip.IpRangeAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.sampler.SamplerAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.significant.SignificantTermsAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.cardinality.CardinalityAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.scripted.ScriptedMetricAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregationBuilder; -import org.elasticsearch.search.aggregations.metrics.valuecount.ValueCountAggregationBuilder; - -/** - * @author ESFlute (using FreeGen) - */ -public abstract class BsSearchFieldLogCA extends EsAbstractConditionAggregation { - - // =================================================================================== - // Aggregation Set - // ========= - - public void filter(String name, EsAbstractConditionQuery.OperatorCall queryLambda, - ConditionOptionCall opLambda, OperatorCall aggsLambda) { - SearchFieldLogCQ cq = new SearchFieldLogCQ(); - if (queryLambda != null) { - queryLambda.callback(cq); - } - FilterAggregationBuilder builder = regFilterA(name, cq.getQuery()); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void global(String name, ConditionOptionCall opLambda, OperatorCall aggsLambda) { - GlobalAggregationBuilder builder = regGlobalA(name); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void sampler(String name, ConditionOptionCall opLambda, OperatorCall aggsLambda) { - SamplerAggregationBuilder builder = regSamplerA(name); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void scriptedMetric(String name, ConditionOptionCall opLambda) { - ScriptedMetricAggregationBuilder builder = regScriptedMetricA(name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void topHits(String name, ConditionOptionCall opLambda) { - TopHitsAggregationBuilder builder = regTopHitsA(name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Terms() { - setName_Terms(null); - } - - public void setName_Terms(ConditionOptionCall opLambda) { - setName_Terms("name", opLambda, null); - } - - public void setName_Terms(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setName_Terms("name", opLambda, aggsLambda); - } - - public void setName_Terms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - TermsAggregationBuilder builder = regTermsA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setName_SignificantTerms() { - setName_SignificantTerms(null); - } - - public void setName_SignificantTerms(ConditionOptionCall opLambda) { - setName_SignificantTerms("name", opLambda, null); - } - - public void setName_SignificantTerms(ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - setName_SignificantTerms("name", opLambda, aggsLambda); - } - - public void setName_SignificantTerms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setName_IpRange() { - setName_IpRange(null); - } - - public void setName_IpRange(ConditionOptionCall opLambda) { - setName_IpRange("name", opLambda, null); - } - - public void setName_IpRange(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setName_IpRange("name", opLambda, aggsLambda); - } - - public void setName_IpRange(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - IpRangeAggregationBuilder builder = regIpRangeA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setName_Count() { - setName_Count(null); - } - - public void setName_Count(ConditionOptionCall opLambda) { - setName_Count("name", opLambda); - } - - public void setName_Count(String name, ConditionOptionCall opLambda) { - ValueCountAggregationBuilder builder = regCountA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Cardinality() { - setName_Cardinality(null); - } - - public void setName_Cardinality(ConditionOptionCall opLambda) { - setName_Cardinality("name", opLambda); - } - - public void setName_Cardinality(String name, ConditionOptionCall opLambda) { - CardinalityAggregationBuilder builder = regCardinalityA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Missing() { - setName_Missing(null); - } - - public void setName_Missing(ConditionOptionCall opLambda) { - setName_Missing("name", opLambda, null); - } - - public void setName_Missing(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setName_Missing("name", opLambda, aggsLambda); - } - - public void setName_Missing(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - MissingAggregationBuilder builder = regMissingA(name, "name"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setSearchLogId_Terms() { - setSearchLogId_Terms(null); - } - - public void setSearchLogId_Terms(ConditionOptionCall opLambda) { - setSearchLogId_Terms("searchLogId", opLambda, null); - } - - public void setSearchLogId_Terms(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setSearchLogId_Terms("searchLogId", opLambda, aggsLambda); - } - - public void setSearchLogId_Terms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - TermsAggregationBuilder builder = regTermsA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setSearchLogId_SignificantTerms() { - setSearchLogId_SignificantTerms(null); - } - - public void setSearchLogId_SignificantTerms(ConditionOptionCall opLambda) { - setSearchLogId_SignificantTerms("searchLogId", opLambda, null); - } - - public void setSearchLogId_SignificantTerms(ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - setSearchLogId_SignificantTerms("searchLogId", opLambda, aggsLambda); - } - - public void setSearchLogId_SignificantTerms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setSearchLogId_IpRange() { - setSearchLogId_IpRange(null); - } - - public void setSearchLogId_IpRange(ConditionOptionCall opLambda) { - setSearchLogId_IpRange("searchLogId", opLambda, null); - } - - public void setSearchLogId_IpRange(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setSearchLogId_IpRange("searchLogId", opLambda, aggsLambda); - } - - public void setSearchLogId_IpRange(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - IpRangeAggregationBuilder builder = regIpRangeA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setSearchLogId_Count() { - setSearchLogId_Count(null); - } - - public void setSearchLogId_Count(ConditionOptionCall opLambda) { - setSearchLogId_Count("searchLogId", opLambda); - } - - public void setSearchLogId_Count(String name, ConditionOptionCall opLambda) { - ValueCountAggregationBuilder builder = regCountA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Cardinality() { - setSearchLogId_Cardinality(null); - } - - public void setSearchLogId_Cardinality(ConditionOptionCall opLambda) { - setSearchLogId_Cardinality("searchLogId", opLambda); - } - - public void setSearchLogId_Cardinality(String name, ConditionOptionCall opLambda) { - CardinalityAggregationBuilder builder = regCardinalityA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Missing() { - setSearchLogId_Missing(null); - } - - public void setSearchLogId_Missing(ConditionOptionCall opLambda) { - setSearchLogId_Missing("searchLogId", opLambda, null); - } - - public void setSearchLogId_Missing(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setSearchLogId_Missing("searchLogId", opLambda, aggsLambda); - } - - public void setSearchLogId_Missing(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - MissingAggregationBuilder builder = regMissingA(name, "searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setValue_Terms() { - setValue_Terms(null); - } - - public void setValue_Terms(ConditionOptionCall opLambda) { - setValue_Terms("value", opLambda, null); - } - - public void setValue_Terms(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setValue_Terms("value", opLambda, aggsLambda); - } - - public void setValue_Terms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - TermsAggregationBuilder builder = regTermsA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setValue_SignificantTerms() { - setValue_SignificantTerms(null); - } - - public void setValue_SignificantTerms(ConditionOptionCall opLambda) { - setValue_SignificantTerms("value", opLambda, null); - } - - public void setValue_SignificantTerms(ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - setValue_SignificantTerms("value", opLambda, aggsLambda); - } - - public void setValue_SignificantTerms(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setValue_IpRange() { - setValue_IpRange(null); - } - - public void setValue_IpRange(ConditionOptionCall opLambda) { - setValue_IpRange("value", opLambda, null); - } - - public void setValue_IpRange(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setValue_IpRange("value", opLambda, aggsLambda); - } - - public void setValue_IpRange(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - IpRangeAggregationBuilder builder = regIpRangeA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setValue_Count() { - setValue_Count(null); - } - - public void setValue_Count(ConditionOptionCall opLambda) { - setValue_Count("value", opLambda); - } - - public void setValue_Count(String name, ConditionOptionCall opLambda) { - ValueCountAggregationBuilder builder = regCountA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Cardinality() { - setValue_Cardinality(null); - } - - public void setValue_Cardinality(ConditionOptionCall opLambda) { - setValue_Cardinality("value", opLambda); - } - - public void setValue_Cardinality(String name, ConditionOptionCall opLambda) { - CardinalityAggregationBuilder builder = regCardinalityA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Missing() { - setValue_Missing(null); - } - - public void setValue_Missing(ConditionOptionCall opLambda) { - setValue_Missing("value", opLambda, null); - } - - public void setValue_Missing(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setValue_Missing("value", opLambda, aggsLambda); - } - - public void setValue_Missing(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - MissingAggregationBuilder builder = regMissingA(name, "value"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setRequestedAt_DateRange() { - setRequestedAt_DateRange(null); - } - - public void setRequestedAt_DateRange(ConditionOptionCall opLambda) { - setRequestedAt_DateRange("requestedAt", opLambda, null); - } - - public void setRequestedAt_DateRange(ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - setRequestedAt_DateRange("requestedAt", opLambda, aggsLambda); - } - - public void setRequestedAt_DateRange(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - DateRangeAggregationBuilder builder = regDateRangeA(name, "requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setRequestedAt_DateHistogram() { - setRequestedAt_DateHistogram(null); - } - - public void setRequestedAt_DateHistogram(ConditionOptionCall opLambda) { - setRequestedAt_DateHistogram("requestedAt", opLambda, null); - } - - public void setRequestedAt_DateHistogram(ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - setRequestedAt_DateHistogram("requestedAt", opLambda, aggsLambda); - } - - public void setRequestedAt_DateHistogram(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - DateHistogramAggregationBuilder builder = regDateHistogramA(name, "requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - - public void setRequestedAt_Count() { - setRequestedAt_Count(null); - } - - public void setRequestedAt_Count(ConditionOptionCall opLambda) { - setRequestedAt_Count("requestedAt", opLambda); - } - - public void setRequestedAt_Count(String name, ConditionOptionCall opLambda) { - ValueCountAggregationBuilder builder = regCountA(name, "requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_Cardinality() { - setRequestedAt_Cardinality(null); - } - - public void setRequestedAt_Cardinality(ConditionOptionCall opLambda) { - setRequestedAt_Cardinality("requestedAt", opLambda); - } - - public void setRequestedAt_Cardinality(String name, ConditionOptionCall opLambda) { - CardinalityAggregationBuilder builder = regCardinalityA(name, "requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_Missing() { - setRequestedAt_Missing(null); - } - - public void setRequestedAt_Missing(ConditionOptionCall opLambda) { - setRequestedAt_Missing("requestedAt", opLambda, null); - } - - public void setRequestedAt_Missing(ConditionOptionCall opLambda, OperatorCall aggsLambda) { - setRequestedAt_Missing("requestedAt", opLambda, aggsLambda); - } - - public void setRequestedAt_Missing(String name, ConditionOptionCall opLambda, - OperatorCall aggsLambda) { - MissingAggregationBuilder builder = regMissingA(name, "requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - if (aggsLambda != null) { - SearchFieldLogCA ca = new SearchFieldLogCA(); - aggsLambda.callback(ca); - ca.getAggregationBuilderList().forEach(builder::subAggregation); - } - } - -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchLogCA.java b/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchLogCA.java index 6ea0ab73d..b84af8f39 100644 --- a/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchLogCA.java +++ b/src/main/java/org/codelibs/fess/es/log/cbean/ca/bs/BsSearchLogCA.java @@ -2772,4 +2772,135 @@ public abstract class BsSearchLogCA extends EsAbstractConditionAggregation { } } + public void setVirtualHost_Terms() { + setVirtualHost_Terms(null); + } + + public void setVirtualHost_Terms(ConditionOptionCall opLambda) { + setVirtualHost_Terms("virtualHost", opLambda, null); + } + + public void setVirtualHost_Terms(ConditionOptionCall opLambda, OperatorCall aggsLambda) { + setVirtualHost_Terms("virtualHost", opLambda, aggsLambda); + } + + public void setVirtualHost_Terms(String name, ConditionOptionCall opLambda, + OperatorCall aggsLambda) { + TermsAggregationBuilder builder = regTermsA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + if (aggsLambda != null) { + SearchLogCA ca = new SearchLogCA(); + aggsLambda.callback(ca); + ca.getAggregationBuilderList().forEach(builder::subAggregation); + } + } + + public void setVirtualHost_SignificantTerms() { + setVirtualHost_SignificantTerms(null); + } + + public void setVirtualHost_SignificantTerms(ConditionOptionCall opLambda) { + setVirtualHost_SignificantTerms("virtualHost", opLambda, null); + } + + public void setVirtualHost_SignificantTerms(ConditionOptionCall opLambda, + OperatorCall aggsLambda) { + setVirtualHost_SignificantTerms("virtualHost", opLambda, aggsLambda); + } + + public void setVirtualHost_SignificantTerms(String name, ConditionOptionCall opLambda, + OperatorCall aggsLambda) { + SignificantTermsAggregationBuilder builder = regSignificantTermsA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + if (aggsLambda != null) { + SearchLogCA ca = new SearchLogCA(); + aggsLambda.callback(ca); + ca.getAggregationBuilderList().forEach(builder::subAggregation); + } + } + + public void setVirtualHost_IpRange() { + setVirtualHost_IpRange(null); + } + + public void setVirtualHost_IpRange(ConditionOptionCall opLambda) { + setVirtualHost_IpRange("virtualHost", opLambda, null); + } + + public void setVirtualHost_IpRange(ConditionOptionCall opLambda, OperatorCall aggsLambda) { + setVirtualHost_IpRange("virtualHost", opLambda, aggsLambda); + } + + public void setVirtualHost_IpRange(String name, ConditionOptionCall opLambda, + OperatorCall aggsLambda) { + IpRangeAggregationBuilder builder = regIpRangeA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + if (aggsLambda != null) { + SearchLogCA ca = new SearchLogCA(); + aggsLambda.callback(ca); + ca.getAggregationBuilderList().forEach(builder::subAggregation); + } + } + + public void setVirtualHost_Count() { + setVirtualHost_Count(null); + } + + public void setVirtualHost_Count(ConditionOptionCall opLambda) { + setVirtualHost_Count("virtualHost", opLambda); + } + + public void setVirtualHost_Count(String name, ConditionOptionCall opLambda) { + ValueCountAggregationBuilder builder = regCountA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Cardinality() { + setVirtualHost_Cardinality(null); + } + + public void setVirtualHost_Cardinality(ConditionOptionCall opLambda) { + setVirtualHost_Cardinality("virtualHost", opLambda); + } + + public void setVirtualHost_Cardinality(String name, ConditionOptionCall opLambda) { + CardinalityAggregationBuilder builder = regCardinalityA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Missing() { + setVirtualHost_Missing(null); + } + + public void setVirtualHost_Missing(ConditionOptionCall opLambda) { + setVirtualHost_Missing("virtualHost", opLambda, null); + } + + public void setVirtualHost_Missing(ConditionOptionCall opLambda, OperatorCall aggsLambda) { + setVirtualHost_Missing("virtualHost", opLambda, aggsLambda); + } + + public void setVirtualHost_Missing(String name, ConditionOptionCall opLambda, + OperatorCall aggsLambda) { + MissingAggregationBuilder builder = regMissingA(name, "virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + if (aggsLambda != null) { + SearchLogCA ca = new SearchLogCA(); + aggsLambda.callback(ca); + ca.getAggregationBuilderList().forEach(builder::subAggregation); + } + } + } diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/cq/SearchFieldLogCQ.java b/src/main/java/org/codelibs/fess/es/log/cbean/cq/SearchFieldLogCQ.java deleted file mode 100644 index 17eb56984..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/cq/SearchFieldLogCQ.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean.cq; - -import org.codelibs.fess.es.log.cbean.cq.bs.BsSearchFieldLogCQ; - -/** - * @author ESFlute (using FreeGen) - */ -public class SearchFieldLogCQ extends BsSearchFieldLogCQ { -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchFieldLogCQ.java b/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchFieldLogCQ.java deleted file mode 100644 index 069ca9191..000000000 --- a/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchFieldLogCQ.java +++ /dev/null @@ -1,1033 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.cbean.cq.bs; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collection; - -import org.codelibs.fess.es.log.allcommon.EsAbstractConditionQuery; -import org.codelibs.fess.es.log.cbean.cq.SearchFieldLogCQ; -import org.dbflute.cbean.ckey.ConditionKey; -import org.elasticsearch.index.query.BoolQueryBuilder; -import org.elasticsearch.index.query.CommonTermsQueryBuilder; -import org.elasticsearch.index.query.ExistsQueryBuilder; -import org.elasticsearch.index.query.IdsQueryBuilder; -import org.elasticsearch.index.query.MatchPhrasePrefixQueryBuilder; -import org.elasticsearch.index.query.MatchPhraseQueryBuilder; -import org.elasticsearch.index.query.MatchQueryBuilder; -import org.elasticsearch.index.query.PrefixQueryBuilder; -import org.elasticsearch.index.query.RangeQueryBuilder; -import org.elasticsearch.index.query.RegexpQueryBuilder; -import org.elasticsearch.index.query.SpanTermQueryBuilder; -import org.elasticsearch.index.query.TermQueryBuilder; -import org.elasticsearch.index.query.TermsQueryBuilder; -import org.elasticsearch.index.query.WildcardQueryBuilder; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder; -import org.elasticsearch.index.query.functionscore.FunctionScoreQueryBuilder.FilterFunctionBuilder; - -/** - * @author ESFlute (using FreeGen) - */ -public abstract class BsSearchFieldLogCQ extends EsAbstractConditionQuery { - - protected static final Class suppressUnusedImportLocalDateTime = LocalDateTime.class; - - // =================================================================================== - // Name Override - // ============= - @Override - public String asTableDbName() { - return "search_field_log"; - } - - @Override - public String xgetAliasName() { - return "search_field_log"; - } - - // =================================================================================== - // Query Control - // ============= - public void functionScore(OperatorCall queryLambda, - ScoreFunctionCall> functionsLambda, - final ConditionOptionCall opLambda) { - SearchFieldLogCQ cq = new SearchFieldLogCQ(); - queryLambda.callback(cq); - final Collection list = new ArrayList<>(); - if (functionsLambda != null) { - functionsLambda.callback((cqLambda, scoreFunctionBuilder) -> { - SearchFieldLogCQ cf = new SearchFieldLogCQ(); - cqLambda.callback(cf); - list.add(new FilterFunctionBuilder(cf.getQuery(), scoreFunctionBuilder)); - }); - } - final FunctionScoreQueryBuilder builder = regFunctionScoreQ(cq.getQuery(), list); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void filtered(FilteredCall filteredLambda) { - filtered(filteredLambda, null); - } - - public void filtered(FilteredCall filteredLambda, ConditionOptionCall opLambda) { - bool((must, should, mustNot, filter) -> { - filteredLambda.callback(must, filter); - }, opLambda); - } - - public void not(OperatorCall notLambda) { - not(notLambda, null); - } - - public void not(final OperatorCall notLambda, final ConditionOptionCall opLambda) { - bool((must, should, mustNot, filter) -> notLambda.callback(mustNot), opLambda); - } - - public void bool(BoolCall boolLambda) { - bool(boolLambda, null); - } - - public void bool(BoolCall boolLambda, ConditionOptionCall opLambda) { - SearchFieldLogCQ mustQuery = new SearchFieldLogCQ(); - SearchFieldLogCQ shouldQuery = new SearchFieldLogCQ(); - SearchFieldLogCQ mustNotQuery = new SearchFieldLogCQ(); - SearchFieldLogCQ filterQuery = new SearchFieldLogCQ(); - boolLambda.callback(mustQuery, shouldQuery, mustNotQuery, filterQuery); - if (mustQuery.hasQueries() || shouldQuery.hasQueries() || mustNotQuery.hasQueries() || filterQuery.hasQueries()) { - BoolQueryBuilder builder = - regBoolCQ(mustQuery.getQueryBuilderList(), shouldQuery.getQueryBuilderList(), mustNotQuery.getQueryBuilderList(), - filterQuery.getQueryBuilderList()); - if (opLambda != null) { - opLambda.callback(builder); - } - } - } - - // =================================================================================== - // Query Set - // ========= - public void setId_Equal(String id) { - setId_Term(id, null); - } - - public void setId_Equal(String id, ConditionOptionCall opLambda) { - setId_Term(id, opLambda); - } - - public void setId_Term(String id) { - setId_Term(id, null); - } - - public void setId_Term(String id, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("_id", id); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setId_NotEqual(String id) { - setId_NotTerm(id, null); - } - - public void setId_NotTerm(String id) { - setId_NotTerm(id, null); - } - - public void setId_NotEqual(String id, ConditionOptionCall opLambda) { - setId_NotTerm(id, opLambda); - } - - public void setId_NotTerm(String id, ConditionOptionCall opLambda) { - not(not -> not.setId_Term(id), opLambda); - } - - public void setId_Terms(Collection idList) { - setId_Terms(idList, null); - } - - public void setId_Terms(Collection idList, ConditionOptionCall opLambda) { - IdsQueryBuilder builder = regIdsQ(idList); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setId_InScope(Collection idList) { - setId_Terms(idList, null); - } - - public void setId_InScope(Collection idList, ConditionOptionCall opLambda) { - setId_Terms(idList, opLambda); - } - - public BsSearchFieldLogCQ addOrderBy_Id_Asc() { - regOBA("_uid"); - return this; - } - - public BsSearchFieldLogCQ addOrderBy_Id_Desc() { - regOBD("_uid"); - return this; - } - - public void setName_Equal(String name) { - setName_Term(name, null); - } - - public void setName_Equal(String name, ConditionOptionCall opLambda) { - setName_Term(name, opLambda); - } - - public void setName_Term(String name) { - setName_Term(name, null); - } - - public void setName_Term(String name, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_NotEqual(String name) { - setName_NotTerm(name, null); - } - - public void setName_NotTerm(String name) { - setName_NotTerm(name, null); - } - - public void setName_NotEqual(String name, ConditionOptionCall opLambda) { - setName_NotTerm(name, opLambda); - } - - public void setName_NotTerm(String name, ConditionOptionCall opLambda) { - not(not -> not.setName_Term(name), opLambda); - } - - public void setName_Terms(Collection nameList) { - setName_Terms(nameList, null); - } - - public void setName_Terms(Collection nameList, ConditionOptionCall opLambda) { - TermsQueryBuilder builder = regTermsQ("name", nameList); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_InScope(Collection nameList) { - setName_Terms(nameList, null); - } - - public void setName_InScope(Collection nameList, ConditionOptionCall opLambda) { - setName_Terms(nameList, opLambda); - } - - public void setName_Match(String name) { - setName_Match(name, null); - } - - public void setName_Match(String name, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_MatchPhrase(String name) { - setName_MatchPhrase(name, null); - } - - public void setName_MatchPhrase(String name, ConditionOptionCall opLambda) { - MatchPhraseQueryBuilder builder = regMatchPhraseQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_MatchPhrasePrefix(String name) { - setName_MatchPhrasePrefix(name, null); - } - - public void setName_MatchPhrasePrefix(String name, ConditionOptionCall opLambda) { - MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Fuzzy(String name) { - setName_Fuzzy(name, null); - } - - public void setName_Fuzzy(String name, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regFuzzyQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Prefix(String name) { - setName_Prefix(name, null); - } - - public void setName_Prefix(String name, ConditionOptionCall opLambda) { - PrefixQueryBuilder builder = regPrefixQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Wildcard(String name) { - setName_Wildcard(name, null); - } - - public void setName_Wildcard(String name, ConditionOptionCall opLambda) { - WildcardQueryBuilder builder = regWildcardQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Regexp(String name) { - setName_Regexp(name, null); - } - - public void setName_Regexp(String name, ConditionOptionCall opLambda) { - RegexpQueryBuilder builder = regRegexpQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_SpanTerm(String name) { - setName_SpanTerm("name", null); - } - - public void setName_SpanTerm(String name, ConditionOptionCall opLambda) { - SpanTermQueryBuilder builder = regSpanTermQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_GreaterThan(String name) { - setName_GreaterThan(name, null); - } - - public void setName_GreaterThan(String name, ConditionOptionCall opLambda) { - final Object _value = name; - RangeQueryBuilder builder = regRangeQ("name", ConditionKey.CK_GREATER_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_LessThan(String name) { - setName_LessThan(name, null); - } - - public void setName_LessThan(String name, ConditionOptionCall opLambda) { - final Object _value = name; - RangeQueryBuilder builder = regRangeQ("name", ConditionKey.CK_LESS_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_GreaterEqual(String name) { - setName_GreaterEqual(name, null); - } - - public void setName_GreaterEqual(String name, ConditionOptionCall opLambda) { - final Object _value = name; - RangeQueryBuilder builder = regRangeQ("name", ConditionKey.CK_GREATER_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_LessEqual(String name) { - setName_LessEqual(name, null); - } - - public void setName_LessEqual(String name, ConditionOptionCall opLambda) { - final Object _value = name; - RangeQueryBuilder builder = regRangeQ("name", ConditionKey.CK_LESS_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_Exists() { - setName_Exists(null); - } - - public void setName_Exists(ConditionOptionCall opLambda) { - ExistsQueryBuilder builder = regExistsQ("name"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setName_CommonTerms(String name) { - setName_CommonTerms(name, null); - } - - public void setName_CommonTerms(String name, ConditionOptionCall opLambda) { - CommonTermsQueryBuilder builder = regCommonTermsQ("name", name); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public BsSearchFieldLogCQ addOrderBy_Name_Asc() { - regOBA("name"); - return this; - } - - public BsSearchFieldLogCQ addOrderBy_Name_Desc() { - regOBD("name"); - return this; - } - - public void setSearchLogId_Equal(String searchLogId) { - setSearchLogId_Term(searchLogId, null); - } - - public void setSearchLogId_Equal(String searchLogId, ConditionOptionCall opLambda) { - setSearchLogId_Term(searchLogId, opLambda); - } - - public void setSearchLogId_Term(String searchLogId) { - setSearchLogId_Term(searchLogId, null); - } - - public void setSearchLogId_Term(String searchLogId, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_NotEqual(String searchLogId) { - setSearchLogId_NotTerm(searchLogId, null); - } - - public void setSearchLogId_NotTerm(String searchLogId) { - setSearchLogId_NotTerm(searchLogId, null); - } - - public void setSearchLogId_NotEqual(String searchLogId, ConditionOptionCall opLambda) { - setSearchLogId_NotTerm(searchLogId, opLambda); - } - - public void setSearchLogId_NotTerm(String searchLogId, ConditionOptionCall opLambda) { - not(not -> not.setSearchLogId_Term(searchLogId), opLambda); - } - - public void setSearchLogId_Terms(Collection searchLogIdList) { - setSearchLogId_Terms(searchLogIdList, null); - } - - public void setSearchLogId_Terms(Collection searchLogIdList, ConditionOptionCall opLambda) { - TermsQueryBuilder builder = regTermsQ("searchLogId", searchLogIdList); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_InScope(Collection searchLogIdList) { - setSearchLogId_Terms(searchLogIdList, null); - } - - public void setSearchLogId_InScope(Collection searchLogIdList, ConditionOptionCall opLambda) { - setSearchLogId_Terms(searchLogIdList, opLambda); - } - - public void setSearchLogId_Match(String searchLogId) { - setSearchLogId_Match(searchLogId, null); - } - - public void setSearchLogId_Match(String searchLogId, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_MatchPhrase(String searchLogId) { - setSearchLogId_MatchPhrase(searchLogId, null); - } - - public void setSearchLogId_MatchPhrase(String searchLogId, ConditionOptionCall opLambda) { - MatchPhraseQueryBuilder builder = regMatchPhraseQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_MatchPhrasePrefix(String searchLogId) { - setSearchLogId_MatchPhrasePrefix(searchLogId, null); - } - - public void setSearchLogId_MatchPhrasePrefix(String searchLogId, ConditionOptionCall opLambda) { - MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Fuzzy(String searchLogId) { - setSearchLogId_Fuzzy(searchLogId, null); - } - - public void setSearchLogId_Fuzzy(String searchLogId, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regFuzzyQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Prefix(String searchLogId) { - setSearchLogId_Prefix(searchLogId, null); - } - - public void setSearchLogId_Prefix(String searchLogId, ConditionOptionCall opLambda) { - PrefixQueryBuilder builder = regPrefixQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Wildcard(String searchLogId) { - setSearchLogId_Wildcard(searchLogId, null); - } - - public void setSearchLogId_Wildcard(String searchLogId, ConditionOptionCall opLambda) { - WildcardQueryBuilder builder = regWildcardQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Regexp(String searchLogId) { - setSearchLogId_Regexp(searchLogId, null); - } - - public void setSearchLogId_Regexp(String searchLogId, ConditionOptionCall opLambda) { - RegexpQueryBuilder builder = regRegexpQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_SpanTerm(String searchLogId) { - setSearchLogId_SpanTerm("searchLogId", null); - } - - public void setSearchLogId_SpanTerm(String searchLogId, ConditionOptionCall opLambda) { - SpanTermQueryBuilder builder = regSpanTermQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_GreaterThan(String searchLogId) { - setSearchLogId_GreaterThan(searchLogId, null); - } - - public void setSearchLogId_GreaterThan(String searchLogId, ConditionOptionCall opLambda) { - final Object _value = searchLogId; - RangeQueryBuilder builder = regRangeQ("searchLogId", ConditionKey.CK_GREATER_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_LessThan(String searchLogId) { - setSearchLogId_LessThan(searchLogId, null); - } - - public void setSearchLogId_LessThan(String searchLogId, ConditionOptionCall opLambda) { - final Object _value = searchLogId; - RangeQueryBuilder builder = regRangeQ("searchLogId", ConditionKey.CK_LESS_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_GreaterEqual(String searchLogId) { - setSearchLogId_GreaterEqual(searchLogId, null); - } - - public void setSearchLogId_GreaterEqual(String searchLogId, ConditionOptionCall opLambda) { - final Object _value = searchLogId; - RangeQueryBuilder builder = regRangeQ("searchLogId", ConditionKey.CK_GREATER_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_LessEqual(String searchLogId) { - setSearchLogId_LessEqual(searchLogId, null); - } - - public void setSearchLogId_LessEqual(String searchLogId, ConditionOptionCall opLambda) { - final Object _value = searchLogId; - RangeQueryBuilder builder = regRangeQ("searchLogId", ConditionKey.CK_LESS_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_Exists() { - setSearchLogId_Exists(null); - } - - public void setSearchLogId_Exists(ConditionOptionCall opLambda) { - ExistsQueryBuilder builder = regExistsQ("searchLogId"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setSearchLogId_CommonTerms(String searchLogId) { - setSearchLogId_CommonTerms(searchLogId, null); - } - - public void setSearchLogId_CommonTerms(String searchLogId, ConditionOptionCall opLambda) { - CommonTermsQueryBuilder builder = regCommonTermsQ("searchLogId", searchLogId); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public BsSearchFieldLogCQ addOrderBy_SearchLogId_Asc() { - regOBA("searchLogId"); - return this; - } - - public BsSearchFieldLogCQ addOrderBy_SearchLogId_Desc() { - regOBD("searchLogId"); - return this; - } - - public void setValue_Equal(String value) { - setValue_Term(value, null); - } - - public void setValue_Equal(String value, ConditionOptionCall opLambda) { - setValue_Term(value, opLambda); - } - - public void setValue_Term(String value) { - setValue_Term(value, null); - } - - public void setValue_Term(String value, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_NotEqual(String value) { - setValue_NotTerm(value, null); - } - - public void setValue_NotTerm(String value) { - setValue_NotTerm(value, null); - } - - public void setValue_NotEqual(String value, ConditionOptionCall opLambda) { - setValue_NotTerm(value, opLambda); - } - - public void setValue_NotTerm(String value, ConditionOptionCall opLambda) { - not(not -> not.setValue_Term(value), opLambda); - } - - public void setValue_Terms(Collection valueList) { - setValue_Terms(valueList, null); - } - - public void setValue_Terms(Collection valueList, ConditionOptionCall opLambda) { - TermsQueryBuilder builder = regTermsQ("value", valueList); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_InScope(Collection valueList) { - setValue_Terms(valueList, null); - } - - public void setValue_InScope(Collection valueList, ConditionOptionCall opLambda) { - setValue_Terms(valueList, opLambda); - } - - public void setValue_Match(String value) { - setValue_Match(value, null); - } - - public void setValue_Match(String value, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_MatchPhrase(String value) { - setValue_MatchPhrase(value, null); - } - - public void setValue_MatchPhrase(String value, ConditionOptionCall opLambda) { - MatchPhraseQueryBuilder builder = regMatchPhraseQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_MatchPhrasePrefix(String value) { - setValue_MatchPhrasePrefix(value, null); - } - - public void setValue_MatchPhrasePrefix(String value, ConditionOptionCall opLambda) { - MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Fuzzy(String value) { - setValue_Fuzzy(value, null); - } - - public void setValue_Fuzzy(String value, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regFuzzyQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Prefix(String value) { - setValue_Prefix(value, null); - } - - public void setValue_Prefix(String value, ConditionOptionCall opLambda) { - PrefixQueryBuilder builder = regPrefixQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Wildcard(String value) { - setValue_Wildcard(value, null); - } - - public void setValue_Wildcard(String value, ConditionOptionCall opLambda) { - WildcardQueryBuilder builder = regWildcardQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Regexp(String value) { - setValue_Regexp(value, null); - } - - public void setValue_Regexp(String value, ConditionOptionCall opLambda) { - RegexpQueryBuilder builder = regRegexpQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_SpanTerm(String value) { - setValue_SpanTerm("value", null); - } - - public void setValue_SpanTerm(String value, ConditionOptionCall opLambda) { - SpanTermQueryBuilder builder = regSpanTermQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_GreaterThan(String value) { - setValue_GreaterThan(value, null); - } - - public void setValue_GreaterThan(String value, ConditionOptionCall opLambda) { - final Object _value = value; - RangeQueryBuilder builder = regRangeQ("value", ConditionKey.CK_GREATER_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_LessThan(String value) { - setValue_LessThan(value, null); - } - - public void setValue_LessThan(String value, ConditionOptionCall opLambda) { - final Object _value = value; - RangeQueryBuilder builder = regRangeQ("value", ConditionKey.CK_LESS_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_GreaterEqual(String value) { - setValue_GreaterEqual(value, null); - } - - public void setValue_GreaterEqual(String value, ConditionOptionCall opLambda) { - final Object _value = value; - RangeQueryBuilder builder = regRangeQ("value", ConditionKey.CK_GREATER_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_LessEqual(String value) { - setValue_LessEqual(value, null); - } - - public void setValue_LessEqual(String value, ConditionOptionCall opLambda) { - final Object _value = value; - RangeQueryBuilder builder = regRangeQ("value", ConditionKey.CK_LESS_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_Exists() { - setValue_Exists(null); - } - - public void setValue_Exists(ConditionOptionCall opLambda) { - ExistsQueryBuilder builder = regExistsQ("value"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setValue_CommonTerms(String value) { - setValue_CommonTerms(value, null); - } - - public void setValue_CommonTerms(String value, ConditionOptionCall opLambda) { - CommonTermsQueryBuilder builder = regCommonTermsQ("value", value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public BsSearchFieldLogCQ addOrderBy_Value_Asc() { - regOBA("value"); - return this; - } - - public BsSearchFieldLogCQ addOrderBy_Value_Desc() { - regOBD("value"); - return this; - } - - public void setRequestedAt_Equal(LocalDateTime requestedAt) { - setRequestedAt_Term(requestedAt, null); - } - - public void setRequestedAt_Equal(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - setRequestedAt_Term(requestedAt, opLambda); - } - - public void setRequestedAt_Term(LocalDateTime requestedAt) { - setRequestedAt_Term(requestedAt, null); - } - - public void setRequestedAt_Term(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - TermQueryBuilder builder = regTermQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_NotEqual(LocalDateTime requestedAt) { - setRequestedAt_NotTerm(requestedAt, null); - } - - public void setRequestedAt_NotTerm(LocalDateTime requestedAt) { - setRequestedAt_NotTerm(requestedAt, null); - } - - public void setRequestedAt_NotEqual(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - setRequestedAt_NotTerm(requestedAt, opLambda); - } - - public void setRequestedAt_NotTerm(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - not(not -> not.setRequestedAt_Term(requestedAt), opLambda); - } - - public void setRequestedAt_Terms(Collection requestedAtList) { - setRequestedAt_Terms(requestedAtList, null); - } - - public void setRequestedAt_Terms(Collection requestedAtList, ConditionOptionCall opLambda) { - TermsQueryBuilder builder = regTermsQ("requestedAt", requestedAtList); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_InScope(Collection requestedAtList) { - setRequestedAt_Terms(requestedAtList, null); - } - - public void setRequestedAt_InScope(Collection requestedAtList, ConditionOptionCall opLambda) { - setRequestedAt_Terms(requestedAtList, opLambda); - } - - public void setRequestedAt_Match(LocalDateTime requestedAt) { - setRequestedAt_Match(requestedAt, null); - } - - public void setRequestedAt_Match(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regMatchQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_MatchPhrase(LocalDateTime requestedAt) { - setRequestedAt_MatchPhrase(requestedAt, null); - } - - public void setRequestedAt_MatchPhrase(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - MatchPhraseQueryBuilder builder = regMatchPhraseQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_MatchPhrasePrefix(LocalDateTime requestedAt) { - setRequestedAt_MatchPhrasePrefix(requestedAt, null); - } - - public void setRequestedAt_MatchPhrasePrefix(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_Fuzzy(LocalDateTime requestedAt) { - setRequestedAt_Fuzzy(requestedAt, null); - } - - public void setRequestedAt_Fuzzy(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - MatchQueryBuilder builder = regFuzzyQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_GreaterThan(LocalDateTime requestedAt) { - setRequestedAt_GreaterThan(requestedAt, null); - } - - public void setRequestedAt_GreaterThan(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - final Object _value = toRangeLocalDateTimeString(requestedAt, "date_optional_time"); - RangeQueryBuilder builder = regRangeQ("requestedAt", ConditionKey.CK_GREATER_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_LessThan(LocalDateTime requestedAt) { - setRequestedAt_LessThan(requestedAt, null); - } - - public void setRequestedAt_LessThan(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - final Object _value = toRangeLocalDateTimeString(requestedAt, "date_optional_time"); - RangeQueryBuilder builder = regRangeQ("requestedAt", ConditionKey.CK_LESS_THAN, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_GreaterEqual(LocalDateTime requestedAt) { - setRequestedAt_GreaterEqual(requestedAt, null); - } - - public void setRequestedAt_GreaterEqual(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - final Object _value = toRangeLocalDateTimeString(requestedAt, "date_optional_time"); - RangeQueryBuilder builder = regRangeQ("requestedAt", ConditionKey.CK_GREATER_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_LessEqual(LocalDateTime requestedAt) { - setRequestedAt_LessEqual(requestedAt, null); - } - - public void setRequestedAt_LessEqual(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - final Object _value = toRangeLocalDateTimeString(requestedAt, "date_optional_time"); - RangeQueryBuilder builder = regRangeQ("requestedAt", ConditionKey.CK_LESS_EQUAL, _value); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_Exists() { - setRequestedAt_Exists(null); - } - - public void setRequestedAt_Exists(ConditionOptionCall opLambda) { - ExistsQueryBuilder builder = regExistsQ("requestedAt"); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public void setRequestedAt_CommonTerms(LocalDateTime requestedAt) { - setRequestedAt_CommonTerms(requestedAt, null); - } - - public void setRequestedAt_CommonTerms(LocalDateTime requestedAt, ConditionOptionCall opLambda) { - CommonTermsQueryBuilder builder = regCommonTermsQ("requestedAt", requestedAt); - if (opLambda != null) { - opLambda.callback(builder); - } - } - - public BsSearchFieldLogCQ addOrderBy_RequestedAt_Asc() { - regOBA("requestedAt"); - return this; - } - - public BsSearchFieldLogCQ addOrderBy_RequestedAt_Desc() { - regOBD("requestedAt"); - return this; - } - -} diff --git a/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchLogCQ.java b/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchLogCQ.java index 2c1a96450..45860b4f3 100644 --- a/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchLogCQ.java +++ b/src/main/java/org/codelibs/fess/es/log/cbean/cq/bs/BsSearchLogCQ.java @@ -3695,4 +3695,226 @@ public abstract class BsSearchLogCQ extends EsAbstractConditionQuery { return this; } + public void setVirtualHost_Equal(String virtualHost) { + setVirtualHost_Term(virtualHost, null); + } + + public void setVirtualHost_Equal(String virtualHost, ConditionOptionCall opLambda) { + setVirtualHost_Term(virtualHost, opLambda); + } + + public void setVirtualHost_Term(String virtualHost) { + setVirtualHost_Term(virtualHost, null); + } + + public void setVirtualHost_Term(String virtualHost, ConditionOptionCall opLambda) { + TermQueryBuilder builder = regTermQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_NotEqual(String virtualHost) { + setVirtualHost_NotTerm(virtualHost, null); + } + + public void setVirtualHost_NotTerm(String virtualHost) { + setVirtualHost_NotTerm(virtualHost, null); + } + + public void setVirtualHost_NotEqual(String virtualHost, ConditionOptionCall opLambda) { + setVirtualHost_NotTerm(virtualHost, opLambda); + } + + public void setVirtualHost_NotTerm(String virtualHost, ConditionOptionCall opLambda) { + not(not -> not.setVirtualHost_Term(virtualHost), opLambda); + } + + public void setVirtualHost_Terms(Collection virtualHostList) { + setVirtualHost_Terms(virtualHostList, null); + } + + public void setVirtualHost_Terms(Collection virtualHostList, ConditionOptionCall opLambda) { + TermsQueryBuilder builder = regTermsQ("virtualHost", virtualHostList); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_InScope(Collection virtualHostList) { + setVirtualHost_Terms(virtualHostList, null); + } + + public void setVirtualHost_InScope(Collection virtualHostList, ConditionOptionCall opLambda) { + setVirtualHost_Terms(virtualHostList, opLambda); + } + + public void setVirtualHost_Match(String virtualHost) { + setVirtualHost_Match(virtualHost, null); + } + + public void setVirtualHost_Match(String virtualHost, ConditionOptionCall opLambda) { + MatchQueryBuilder builder = regMatchQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_MatchPhrase(String virtualHost) { + setVirtualHost_MatchPhrase(virtualHost, null); + } + + public void setVirtualHost_MatchPhrase(String virtualHost, ConditionOptionCall opLambda) { + MatchPhraseQueryBuilder builder = regMatchPhraseQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_MatchPhrasePrefix(String virtualHost) { + setVirtualHost_MatchPhrasePrefix(virtualHost, null); + } + + public void setVirtualHost_MatchPhrasePrefix(String virtualHost, ConditionOptionCall opLambda) { + MatchPhrasePrefixQueryBuilder builder = regMatchPhrasePrefixQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Fuzzy(String virtualHost) { + setVirtualHost_Fuzzy(virtualHost, null); + } + + public void setVirtualHost_Fuzzy(String virtualHost, ConditionOptionCall opLambda) { + MatchQueryBuilder builder = regFuzzyQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Prefix(String virtualHost) { + setVirtualHost_Prefix(virtualHost, null); + } + + public void setVirtualHost_Prefix(String virtualHost, ConditionOptionCall opLambda) { + PrefixQueryBuilder builder = regPrefixQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Wildcard(String virtualHost) { + setVirtualHost_Wildcard(virtualHost, null); + } + + public void setVirtualHost_Wildcard(String virtualHost, ConditionOptionCall opLambda) { + WildcardQueryBuilder builder = regWildcardQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Regexp(String virtualHost) { + setVirtualHost_Regexp(virtualHost, null); + } + + public void setVirtualHost_Regexp(String virtualHost, ConditionOptionCall opLambda) { + RegexpQueryBuilder builder = regRegexpQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_SpanTerm(String virtualHost) { + setVirtualHost_SpanTerm("virtualHost", null); + } + + public void setVirtualHost_SpanTerm(String virtualHost, ConditionOptionCall opLambda) { + SpanTermQueryBuilder builder = regSpanTermQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_GreaterThan(String virtualHost) { + setVirtualHost_GreaterThan(virtualHost, null); + } + + public void setVirtualHost_GreaterThan(String virtualHost, ConditionOptionCall opLambda) { + final Object _value = virtualHost; + RangeQueryBuilder builder = regRangeQ("virtualHost", ConditionKey.CK_GREATER_THAN, _value); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_LessThan(String virtualHost) { + setVirtualHost_LessThan(virtualHost, null); + } + + public void setVirtualHost_LessThan(String virtualHost, ConditionOptionCall opLambda) { + final Object _value = virtualHost; + RangeQueryBuilder builder = regRangeQ("virtualHost", ConditionKey.CK_LESS_THAN, _value); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_GreaterEqual(String virtualHost) { + setVirtualHost_GreaterEqual(virtualHost, null); + } + + public void setVirtualHost_GreaterEqual(String virtualHost, ConditionOptionCall opLambda) { + final Object _value = virtualHost; + RangeQueryBuilder builder = regRangeQ("virtualHost", ConditionKey.CK_GREATER_EQUAL, _value); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_LessEqual(String virtualHost) { + setVirtualHost_LessEqual(virtualHost, null); + } + + public void setVirtualHost_LessEqual(String virtualHost, ConditionOptionCall opLambda) { + final Object _value = virtualHost; + RangeQueryBuilder builder = regRangeQ("virtualHost", ConditionKey.CK_LESS_EQUAL, _value); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_Exists() { + setVirtualHost_Exists(null); + } + + public void setVirtualHost_Exists(ConditionOptionCall opLambda) { + ExistsQueryBuilder builder = regExistsQ("virtualHost"); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public void setVirtualHost_CommonTerms(String virtualHost) { + setVirtualHost_CommonTerms(virtualHost, null); + } + + public void setVirtualHost_CommonTerms(String virtualHost, ConditionOptionCall opLambda) { + CommonTermsQueryBuilder builder = regCommonTermsQ("virtualHost", virtualHost); + if (opLambda != null) { + opLambda.callback(builder); + } + } + + public BsSearchLogCQ addOrderBy_VirtualHost_Asc() { + regOBA("virtualHost"); + return this; + } + + public BsSearchLogCQ addOrderBy_VirtualHost_Desc() { + regOBD("virtualHost"); + return this; + } + } diff --git a/src/main/java/org/codelibs/fess/es/log/exbhv/SearchFieldLogBhv.java b/src/main/java/org/codelibs/fess/es/log/exbhv/SearchFieldLogBhv.java deleted file mode 100644 index a3e50757d..000000000 --- a/src/main/java/org/codelibs/fess/es/log/exbhv/SearchFieldLogBhv.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.exbhv; - -import org.codelibs.fess.es.log.bsbhv.BsSearchFieldLogBhv; -import org.codelibs.fess.util.ComponentUtil; - -/** - * @author FreeGen - */ -public class SearchFieldLogBhv extends BsSearchFieldLogBhv { - @Override - protected String asEsIndex() { - return ComponentUtil.getFessConfig().getIndexLogIndex(); - } -} diff --git a/src/main/java/org/codelibs/fess/es/log/exbhv/SearchLogBhv.java b/src/main/java/org/codelibs/fess/es/log/exbhv/SearchLogBhv.java index c4b73f128..105229f97 100644 --- a/src/main/java/org/codelibs/fess/es/log/exbhv/SearchLogBhv.java +++ b/src/main/java/org/codelibs/fess/es/log/exbhv/SearchLogBhv.java @@ -20,9 +20,13 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; +import java.util.Map; +import org.codelibs.core.misc.Pair; import org.codelibs.fess.es.log.bsbhv.BsSearchLogBhv; +import org.codelibs.fess.es.log.exentity.SearchLog; import org.codelibs.fess.util.ComponentUtil; +import org.dbflute.exception.IllegalBehaviorStateException; import org.dbflute.util.DfTypeUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,4 +56,20 @@ public class SearchLogBhv extends BsSearchLogBhv { return DfTypeUtil.toLocalDateTime(value); } + @Override + protected RESULT createEntity(Map source, Class entityType) { + try { + final RESULT result = entityType.newInstance(); + final Object searchFieldObj = source.get("searchField"); + if (searchFieldObj instanceof Map) { + ((Map) searchFieldObj).entrySet().stream() + .forEach(e -> result.getSearchFieldLogList().add(new Pair(e.getKey(), e.getValue()))); + } + return result; + } catch (InstantiationException | IllegalAccessException e) { + final String msg = "Cannot create a new instance: " + entityType.getName(); + throw new IllegalBehaviorStateException(msg, e); + } + } + } diff --git a/src/main/java/org/codelibs/fess/es/log/exentity/SearchFieldLog.java b/src/main/java/org/codelibs/fess/es/log/exentity/SearchFieldLog.java deleted file mode 100644 index 161c0d5ec..000000000 --- a/src/main/java/org/codelibs/fess/es/log/exentity/SearchFieldLog.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2012-2017 CodeLibs Project and the Others. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - * either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ -package org.codelibs.fess.es.log.exentity; - -import java.util.Map; - -import org.codelibs.fess.es.log.bsentity.BsSearchFieldLog; - -/** - * @author FreeGen - */ -public class SearchFieldLog extends BsSearchFieldLog { - - private static final long serialVersionUID = 1L; - - private Map fields; - - public String getId() { - return asDocMeta().id(); - } - - public void setId(final String id) { - asDocMeta().id(id); - } - - public Long getVersionNo() { - return asDocMeta().version(); - } - - public void setVersionNo(final Long version) { - asDocMeta().version(version); - } - - public void addField(final String key, final Object value) { - fields.put(key, value); - } - - @Override - public Map toSource() { - final Map sourceMap = super.toSource(); - if (fields != null) { - sourceMap.putAll(fields); - } - return sourceMap; - } - - @Override - public String toString() { - return "SearchFieldLog [name=" + name + ", searchLogId=" + searchLogId + ", value=" + value + ", docMeta=" + docMeta + "]"; - } -} diff --git a/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java b/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java index c04b7f502..376291b40 100644 --- a/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java +++ b/src/main/java/org/codelibs/fess/es/log/exentity/SearchLog.java @@ -23,11 +23,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import org.codelibs.core.lang.StringUtil; +import org.codelibs.core.misc.Pair; import org.codelibs.fess.Constants; import org.codelibs.fess.es.log.bsentity.BsSearchLog; -import org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv; import org.codelibs.fess.es.log.exbhv.UserInfoBhv; import org.codelibs.fess.util.ComponentUtil; import org.dbflute.optional.OptionalEntity; @@ -39,7 +40,7 @@ public class SearchLog extends BsSearchLog { private static final long serialVersionUID = 1L; - private List searchFieldLogList; + private List> searchFieldLogList = new ArrayList<>(); private OptionalEntity userInfo; @@ -61,20 +62,9 @@ public class SearchLog extends BsSearchLog { asDocMeta().version(version); } - public void setClickLogList(final List clickLogList) { - - } - public void addSearchFieldLogValue(final String name, final String value) { if (StringUtil.isNotBlank(name) && StringUtil.isNotBlank(value)) { - final SearchFieldLog fieldLog = new SearchFieldLog(); - fieldLog.setName(name); - fieldLog.setValue(value); - fieldLog.setRequestedAt(getRequestedAt()); - if (searchFieldLogList == null) { - searchFieldLogList = new ArrayList<>(); - } - searchFieldLogList.add(fieldLog); + searchFieldLogList.add(new Pair(name, value)); } } @@ -96,14 +86,7 @@ public class SearchLog extends BsSearchLog { this.userInfo = userInfo; } - public List getSearchFieldLogList() { - if (searchFieldLogList == null) { - final SearchFieldLogBhv searchFieldLogBhv = ComponentUtil.getComponent(SearchFieldLogBhv.class); - searchFieldLogList = searchFieldLogBhv.selectList(cb -> { - cb.query().setSearchLogId_Equal(getId()); - cb.fetchFirst(ComponentUtil.getFessConfig().getPageSearchFieldLogMaxFetchSizeAsInteger()); - }); - } + public List> getSearchFieldLogList() { return searchFieldLogList; } @@ -117,6 +100,8 @@ public class SearchLog extends BsSearchLog { if (fields != null) { sourceMap.putAll(fields); } + final Map searchFieldMap = searchFieldLogList.stream().collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)); + sourceMap.put("searchField", searchFieldMap); return sourceMap; } diff --git a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java index 9cfeb79c9..2ea8145e3 100644 --- a/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SearchLogHelper.java @@ -37,11 +37,9 @@ import org.codelibs.fess.entity.SearchRequestParams; import org.codelibs.fess.entity.SearchRequestParams.SearchRequestType; import org.codelibs.fess.es.log.exbhv.ClickLogBhv; import org.codelibs.fess.es.log.exbhv.FavoriteLogBhv; -import org.codelibs.fess.es.log.exbhv.SearchFieldLogBhv; import org.codelibs.fess.es.log.exbhv.SearchLogBhv; import org.codelibs.fess.es.log.exbhv.UserInfoBhv; import org.codelibs.fess.es.log.exentity.ClickLog; -import org.codelibs.fess.es.log.exentity.SearchFieldLog; import org.codelibs.fess.es.log.exentity.SearchLog; import org.codelibs.fess.es.log.exentity.UserInfo; import org.codelibs.fess.mylasta.action.FessUserBean; @@ -120,15 +118,22 @@ public class SearchLogHelper { if (languages != null) { searchLog.setLanguages(StringUtils.join((String[]) languages, ",")); } else { - searchLog.setLanguages(""); + searchLog.setLanguages(StringUtil.EMPTY); + } + final String virtualHostKey = ComponentUtil.getFessConfig().getVirtualHostKey(); + if (virtualHostKey != null) { + searchLog.setVirtualHost(virtualHostKey); + } else { + searchLog.setVirtualHost(StringUtil.EMPTY); } @SuppressWarnings("unchecked") final Map> fieldLogMap = (Map>) request.getAttribute(Constants.FIELD_LOGS); if (fieldLogMap != null) { + final int queryMaxLength = ComponentUtil.getFessConfig().getQueryMaxLengthAsInteger(); for (final Map.Entry> logEntry : fieldLogMap.entrySet()) { for (final String value : logEntry.getValue()) { - searchLog.addSearchFieldLogValue(logEntry.getKey(), StringUtils.abbreviate(value, 1000)); + searchLog.addSearchFieldLogValue(logEntry.getKey(), StringUtils.abbreviate(value, queryMaxLength)); } } } @@ -258,18 +263,9 @@ public class SearchLogHelper { private void storeSearchLogList(final List searchLogList) { final SearchLogBhv searchLogBhv = ComponentUtil.getComponent(SearchLogBhv.class); - final SearchFieldLogBhv searchFieldLogBhv = ComponentUtil.getComponent(SearchFieldLogBhv.class); searchLogBhv.batchUpdate(searchLogList, op -> { op.setRefreshPolicy(Constants.TRUE); }); - searchLogList.stream().forEach(searchLog -> { - final List fieldLogList = new ArrayList<>(); - searchLog.getSearchFieldLogList().stream().forEach(fieldLog -> { - fieldLog.setSearchLogId(searchLog.getId()); - fieldLogList.add(fieldLog); - }); - searchFieldLogBhv.batchInsert(fieldLogList); - }); } protected void processClickLogQueue(final Queue queue) { diff --git a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java index 1d1599089..3e506025d 100644 --- a/src/main/java/org/codelibs/fess/helper/SuggestHelper.java +++ b/src/main/java/org/codelibs/fess/helper/SuggestHelper.java @@ -32,13 +32,13 @@ import javax.annotation.PostConstruct; import javax.annotation.Resource; import org.codelibs.core.lang.StringUtil; +import org.codelibs.core.misc.Pair; import org.codelibs.fess.es.client.FessEsClient; import org.codelibs.fess.es.config.exbhv.BadWordBhv; import org.codelibs.fess.es.config.exbhv.ElevateWordBhv; import org.codelibs.fess.es.config.exentity.BadWord; import org.codelibs.fess.es.config.exentity.ElevateWord; import org.codelibs.fess.es.log.exbhv.SearchLogBhv; -import org.codelibs.fess.es.log.exentity.SearchFieldLog; import org.codelibs.fess.es.log.exentity.SearchLog; import org.codelibs.fess.mylasta.direction.FessConfig; import org.codelibs.fess.suggest.Suggester; @@ -147,18 +147,18 @@ public class SuggestHelper { final List tags = new ArrayList<>(); final List roles = new ArrayList<>(); - for (final SearchFieldLog searchFieldLog : searchLog.getSearchFieldLogList()) { - final String name = searchFieldLog.getName(); + for (final Pair searchFieldLog : searchLog.getSearchFieldLogList()) { + final String name = searchFieldLog.getFirst(); if (contentFieldNameSet.contains(name)) { if (sb.length() > 0) { sb.append(TEXT_SEP); } - sb.append(searchFieldLog.getValue()); + sb.append(searchFieldLog.getSecond()); fields.add(name); } else if (tagFieldNameSet.contains(name)) { - tags.add(searchFieldLog.getValue()); + tags.add(searchFieldLog.getSecond()); } else if (roleFieldNameSet.contains(name)) { - roles.add(searchFieldLog.getValue()); + roles.add(searchFieldLog.getSecond()); } } diff --git a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java index cd3f0cc1a..9122baaef 100644 --- a/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java +++ b/src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java @@ -620,7 +620,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction /** The key of the configuration. e.g. .fess_basic_config.bulk,.fess_config.bulk,.fess_user.bulk,system.properties */ String INDEX_BACKUP_TARGETS = "index.backup.targets"; - /** The key of the configuration. e.g. click_log.csv,favorite_log.csv,search_log.csv,search_field_log.csv,user_info.csv */ + /** The key of the configuration. e.g. click_log.csv,favorite_log.csv,search_log.csv,user_info.csv */ String INDEX_BACKUP_LOG_TARGETS = "index.backup.log.targets"; /** The key of the configuration. e.g. 4000 */ @@ -3078,7 +3078,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction /** * Get the value for the key 'index.backup.log.targets'.
- * The value is, e.g. click_log.csv,favorite_log.csv,search_log.csv,search_field_log.csv,user_info.csv
+ * The value is, e.g. click_log.csv,favorite_log.csv,search_log.csv,user_info.csv
* @return The value of found property. (NotNull: if not found, exception but basically no way) */ String getIndexBackupLogTargets(); @@ -7553,8 +7553,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction defaultMap.put(FessConfig.SMB_ROLE_FROM_FILE, "true"); defaultMap.put(FessConfig.SMB_AVAILABLE_SID_TYPES, "1,2"); defaultMap.put(FessConfig.INDEX_BACKUP_TARGETS, ".fess_basic_config.bulk,.fess_config.bulk,.fess_user.bulk,system.properties"); - defaultMap.put(FessConfig.INDEX_BACKUP_LOG_TARGETS, - "click_log.csv,favorite_log.csv,search_log.csv,search_field_log.csv,user_info.csv"); + defaultMap.put(FessConfig.INDEX_BACKUP_LOG_TARGETS, "click_log.csv,favorite_log.csv,search_log.csv,user_info.csv"); defaultMap.put(FessConfig.FORM_ADMIN_MAX_INPUT_SIZE, "4000"); defaultMap.put(FessConfig.AUTHENTICATION_ADMIN_USERS, "admin"); defaultMap.put(FessConfig.AUTHENTICATION_ADMIN_ROLES, "admin"); diff --git a/src/main/resources/esclient.xml b/src/main/resources/esclient.xml index dde38168f..852ede23a 100644 --- a/src/main/resources/esclient.xml +++ b/src/main/resources/esclient.xml @@ -271,9 +271,6 @@ "fess_log/favorite_log" - - "fess_log/search_field_log" - "fess_log/search_log" diff --git a/src/main/resources/esflute_log.xml b/src/main/resources/esflute_log.xml index 0b4c9b0f1..2637238b8 100644 --- a/src/main/resources/esflute_log.xml +++ b/src/main/resources/esflute_log.xml @@ -11,7 +11,6 @@ - diff --git a/src/main/resources/fess_config.properties b/src/main/resources/fess_config.properties index 32175597f..6f5339c71 100644 --- a/src/main/resources/fess_config.properties +++ b/src/main/resources/fess_config.properties @@ -315,7 +315,7 @@ smb.available.sid.types=1,2 # backup index.backup.targets=.fess_basic_config.bulk,.fess_config.bulk,.fess_user.bulk,system.properties -index.backup.log.targets=click_log.csv,favorite_log.csv,search_log.csv,search_field_log.csv,user_info.csv +index.backup.log.targets=click_log.csv,favorite_log.csv,search_log.csv,user_info.csv # ======================================================================================== # Web diff --git a/src/main/resources/fess_indices/fess_log/search_field_log.json b/src/main/resources/fess_indices/fess_log/search_field_log.json deleted file mode 100644 index 76e55bc8c..000000000 --- a/src/main/resources/fess_indices/fess_log/search_field_log.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "search_field_log": { - "_source": { - "enabled": true - }, - "_all": { - "enabled": false - }, - "properties": { - "searchLogId": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "value": { - "type": "keyword" - }, - "requestedAt": { - "type": "date", - "format": "date_optional_time" - } - } - } -} diff --git a/src/main/resources/fess_indices/fess_log/search_log.json b/src/main/resources/fess_indices/fess_log/search_log.json index bde00d7df..d408859b3 100644 --- a/src/main/resources/fess_indices/fess_log/search_log.json +++ b/src/main/resources/fess_indices/fess_log/search_log.json @@ -6,6 +6,16 @@ "_all": { "enabled": false }, + "dynamic_templates": [ + { + "search_fields": { + "path_match": "searchField.*", + "mapping": { + "type": "keyword" + } + } + } + ], "properties": { "user": { "type": "keyword" @@ -58,6 +68,9 @@ }, "languages" : { "type" : "keyword" + }, + "virtualHost" : { + "type" : "keyword" } } }