Quellcode durchsuchen

fix #766 add thumbnail generator job

Shinsuke Sugaya vor 8 Jahren
Ursprung
Commit
ace8d86c13
24 geänderte Dateien mit 2346 neuen und 76 gelöschten Zeilen
  1. 26 0
      src/main/config/es/fess_config.json
  2. 1 1
      src/main/java/org/codelibs/fess/app/web/thumbnail/ThumbnailAction.java
  3. 257 0
      src/main/java/org/codelibs/fess/es/config/bsbhv/BsThumbnailQueueBhv.java
  4. 164 0
      src/main/java/org/codelibs/fess/es/config/bsentity/BsThumbnailQueue.java
  5. 239 0
      src/main/java/org/codelibs/fess/es/config/bsentity/dbmeta/ThumbnailQueueDbm.java
  6. 24 0
      src/main/java/org/codelibs/fess/es/config/cbean/ThumbnailQueueCB.java
  7. 170 0
      src/main/java/org/codelibs/fess/es/config/cbean/bs/BsThumbnailQueueCB.java
  8. 24 0
      src/main/java/org/codelibs/fess/es/config/cbean/cq/ThumbnailQueueCQ.java
  9. 1167 0
      src/main/java/org/codelibs/fess/es/config/cbean/cq/bs/BsThumbnailQueueCQ.java
  10. 25 0
      src/main/java/org/codelibs/fess/es/config/exbhv/ThumbnailQueueBhv.java
  11. 48 0
      src/main/java/org/codelibs/fess/es/config/exentity/ThumbnailQueue.java
  12. 40 0
      src/main/java/org/codelibs/fess/job/GenerateThumbnailJob.java
  13. 26 0
      src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java
  14. 2 0
      src/main/java/org/codelibs/fess/thumbnail/ThumbnailGenerator.java
  15. 70 70
      src/main/java/org/codelibs/fess/thumbnail/ThumbnailManager.java
  16. 10 0
      src/main/java/org/codelibs/fess/thumbnail/impl/BaseThumbnailGenerator.java
  17. 3 0
      src/main/resources/esclient.xml
  18. 4 3
      src/main/resources/esflute_config.xml
  19. 1 0
      src/main/resources/fess_config.properties
  20. 5 0
      src/main/resources/fess_indices/.fess_config/alias/.fess_basic_config.json
  21. 4 2
      src/main/resources/fess_indices/.fess_config/scheduled_job.bulk
  22. 31 0
      src/main/resources/fess_indices/.fess_config/thumbnail_queue.json
  23. 2 0
      src/main/resources/fess_job.xml
  24. 3 0
      src/main/resources/fess_thumbnail.xml

+ 26 - 0
src/main/config/es/fess_config.json

@@ -962,6 +962,32 @@
             "index" : "not_analyzed"
             "index" : "not_analyzed"
           }
           }
         }
         }
+      },
+      "thumbnail_queue" : {
+        "_all" : {
+          "enabled" : false
+        },
+        "properties" : {
+          "createdBy" : {
+            "type" : "string",
+            "index" : "not_analyzed"
+          },
+          "createdTime" : {
+            "type" : "long"
+          },
+          "generator" : {
+            "type" : "string",
+            "index" : "not_analyzed"
+          },
+          "path" : {
+            "type" : "string",
+            "index" : "not_analyzed"
+          },
+          "url" : {
+            "type" : "string",
+            "index" : "not_analyzed"
+          }
+        }
       }
       }
     },
     },
     "settings" : {
     "settings" : {

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/thumbnail/ThumbnailAction.java

@@ -71,7 +71,7 @@ public class ThumbnailAction extends FessSearchAction {
         final File thumbnailFile = thumbnailManager.getThumbnailFile(form.queryId, form.docId);
         final File thumbnailFile = thumbnailManager.getThumbnailFile(form.queryId, form.docId);
         if (thumbnailFile == null) {
         if (thumbnailFile == null) {
             // 404
             // 404
-            thumbnailManager.generate(doc);
+            thumbnailManager.offer(doc);
             throw responseManager.new404("Thumbnail for " + form.docId + " is under generating.");
             throw responseManager.new404("Thumbnail for " + form.docId + " is under generating.");
         }
         }
 
 

+ 257 - 0
src/main/java/org/codelibs/fess/es/config/bsbhv/BsThumbnailQueueBhv.java

@@ -0,0 +1,257 @@
+/*
+ * Copyright 2012-2016 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.config.bsbhv;
+
+import java.util.List;
+import java.util.Map;
+
+import org.codelibs.fess.es.config.allcommon.EsAbstractBehavior;
+import org.codelibs.fess.es.config.allcommon.EsAbstractEntity.RequestOptionCall;
+import org.codelibs.fess.es.config.bsentity.dbmeta.ThumbnailQueueDbm;
+import org.codelibs.fess.es.config.cbean.ThumbnailQueueCB;
+import org.codelibs.fess.es.config.exentity.ThumbnailQueue;
+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 BsThumbnailQueueBhv extends EsAbstractBehavior<ThumbnailQueue, ThumbnailQueueCB> {
+
+    // ===================================================================================
+    //                                                                    Control Override
+    //                                                                    ================
+    @Override
+    public String asTableDbName() {
+        return asEsIndexType();
+    }
+
+    @Override
+    protected String asEsIndex() {
+        return ".fess_config";
+    }
+
+    @Override
+    public String asEsIndexType() {
+        return "thumbnail_queue";
+    }
+
+    @Override
+    public String asEsSearchType() {
+        return "thumbnail_queue";
+    }
+
+    @Override
+    public ThumbnailQueueDbm asDBMeta() {
+        return ThumbnailQueueDbm.getInstance();
+    }
+
+    @Override
+    protected <RESULT extends ThumbnailQueue> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {
+        try {
+            final RESULT result = entityType.newInstance();
+            result.setCreatedBy(DfTypeUtil.toString(source.get("createdBy")));
+            result.setCreatedTime(DfTypeUtil.toLong(source.get("createdTime")));
+            result.setGenerator(DfTypeUtil.toString(source.get("generator")));
+            result.setPath(DfTypeUtil.toString(source.get("path")));
+            result.setUrl(DfTypeUtil.toString(source.get("url")));
+            return result;
+        } catch (InstantiationException | IllegalAccessException e) {
+            final String msg = "Cannot create a new instance: " + entityType.getName();
+            throw new IllegalBehaviorStateException(msg, e);
+        }
+    }
+
+    // ===================================================================================
+    //                                                                              Select
+    //                                                                              ======
+    public int selectCount(CBCall<ThumbnailQueueCB> cbLambda) {
+        return facadeSelectCount(createCB(cbLambda));
+    }
+
+    public OptionalEntity<ThumbnailQueue> selectEntity(CBCall<ThumbnailQueueCB> cbLambda) {
+        return facadeSelectEntity(createCB(cbLambda));
+    }
+
+    protected OptionalEntity<ThumbnailQueue> facadeSelectEntity(ThumbnailQueueCB cb) {
+        return doSelectOptionalEntity(cb, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends ThumbnailQueue> OptionalEntity<ENTITY> doSelectOptionalEntity(ThumbnailQueueCB cb, Class<? extends ENTITY> tp) {
+        return createOptionalEntity(doSelectEntity(cb, tp), cb);
+    }
+
+    @Override
+    public ThumbnailQueueCB newConditionBean() {
+        return new ThumbnailQueueCB();
+    }
+
+    @Override
+    protected Entity doReadEntity(ConditionBean cb) {
+        return facadeSelectEntity(downcast(cb)).orElse(null);
+    }
+
+    public ThumbnailQueue selectEntityWithDeletedCheck(CBCall<ThumbnailQueueCB> cbLambda) {
+        return facadeSelectEntityWithDeletedCheck(createCB(cbLambda));
+    }
+
+    public OptionalEntity<ThumbnailQueue> selectByPK(String id) {
+        return facadeSelectByPK(id);
+    }
+
+    protected OptionalEntity<ThumbnailQueue> facadeSelectByPK(String id) {
+        return doSelectOptionalByPK(id, typeOfSelectedEntity());
+    }
+
+    protected <ENTITY extends ThumbnailQueue> ENTITY doSelectByPK(String id, Class<? extends ENTITY> tp) {
+        return doSelectEntity(xprepareCBAsPK(id), tp);
+    }
+
+    protected ThumbnailQueueCB xprepareCBAsPK(String id) {
+        assertObjectNotNull("id", id);
+        return newConditionBean().acceptPK(id);
+    }
+
+    protected <ENTITY extends ThumbnailQueue> OptionalEntity<ENTITY> doSelectOptionalByPK(String id, Class<? extends ENTITY> tp) {
+        return createOptionalEntity(doSelectByPK(id, tp), id);
+    }
+
+    @Override
+    protected Class<? extends ThumbnailQueue> typeOfSelectedEntity() {
+        return ThumbnailQueue.class;
+    }
+
+    @Override
+    protected Class<ThumbnailQueue> typeOfHandlingEntity() {
+        return ThumbnailQueue.class;
+    }
+
+    @Override
+    protected Class<ThumbnailQueueCB> typeOfHandlingConditionBean() {
+        return ThumbnailQueueCB.class;
+    }
+
+    public ListResultBean<ThumbnailQueue> selectList(CBCall<ThumbnailQueueCB> cbLambda) {
+        return facadeSelectList(createCB(cbLambda));
+    }
+
+    public PagingResultBean<ThumbnailQueue> selectPage(CBCall<ThumbnailQueueCB> cbLambda) {
+        // #pending same?
+        return (PagingResultBean<ThumbnailQueue>) facadeSelectList(createCB(cbLambda));
+    }
+
+    public void selectCursor(CBCall<ThumbnailQueueCB> cbLambda, EntityRowHandler<ThumbnailQueue> entityLambda) {
+        facadeSelectCursor(createCB(cbLambda), entityLambda);
+    }
+
+    public void selectBulk(CBCall<ThumbnailQueueCB> cbLambda, EntityRowHandler<List<ThumbnailQueue>> entityLambda) {
+        delegateSelectBulk(createCB(cbLambda), entityLambda, typeOfSelectedEntity());
+    }
+
+    // ===================================================================================
+    //                                                                              Update
+    //                                                                              ======
+    public void insert(ThumbnailQueue entity) {
+        doInsert(entity, null);
+    }
+
+    public void insert(ThumbnailQueue entity, RequestOptionCall<IndexRequestBuilder> opLambda) {
+        entity.asDocMeta().indexOption(opLambda);
+        doInsert(entity, null);
+    }
+
+    public void update(ThumbnailQueue entity) {
+        doUpdate(entity, null);
+    }
+
+    public void update(ThumbnailQueue entity, RequestOptionCall<IndexRequestBuilder> opLambda) {
+        entity.asDocMeta().indexOption(opLambda);
+        doUpdate(entity, null);
+    }
+
+    public void insertOrUpdate(ThumbnailQueue entity) {
+        doInsertOrUpdate(entity, null, null);
+    }
+
+    public void insertOrUpdate(ThumbnailQueue entity, RequestOptionCall<IndexRequestBuilder> opLambda) {
+        entity.asDocMeta().indexOption(opLambda);
+        doInsertOrUpdate(entity, null, null);
+    }
+
+    public void delete(ThumbnailQueue entity) {
+        doDelete(entity, null);
+    }
+
+    public void delete(ThumbnailQueue entity, RequestOptionCall<DeleteRequestBuilder> opLambda) {
+        entity.asDocMeta().deleteOption(opLambda);
+        doDelete(entity, null);
+    }
+
+    public int queryDelete(CBCall<ThumbnailQueueCB> cbLambda) {
+        return doQueryDelete(createCB(cbLambda), null);
+    }
+
+    public int[] batchInsert(List<ThumbnailQueue> list) {
+        return batchInsert(list, null, null);
+    }
+
+    public int[] batchInsert(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call) {
+        return batchInsert(list, call, null);
+    }
+
+    public int[] batchInsert(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call,
+            RequestOptionCall<IndexRequestBuilder> entityCall) {
+        return doBatchInsert(new BulkList<>(list, call, entityCall), null);
+    }
+
+    public int[] batchUpdate(List<ThumbnailQueue> list) {
+        return batchUpdate(list, null, null);
+    }
+
+    public int[] batchUpdate(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call) {
+        return batchUpdate(list, call, null);
+    }
+
+    public int[] batchUpdate(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call,
+            RequestOptionCall<IndexRequestBuilder> entityCall) {
+        return doBatchUpdate(new BulkList<>(list, call, entityCall), null);
+    }
+
+    public int[] batchDelete(List<ThumbnailQueue> list) {
+        return batchDelete(list, null, null);
+    }
+
+    public int[] batchDelete(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call) {
+        return batchDelete(list, call, null);
+    }
+
+    public int[] batchDelete(List<ThumbnailQueue> list, RequestOptionCall<BulkRequestBuilder> call,
+            RequestOptionCall<IndexRequestBuilder> entityCall) {
+        return doBatchDelete(new BulkList<>(list, call, entityCall), null);
+    }
+
+    // #pending create, modify, remove
+}

+ 164 - 0
src/main/java/org/codelibs/fess/es/config/bsentity/BsThumbnailQueue.java

@@ -0,0 +1,164 @@
+/*
+ * Copyright 2012-2016 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.config.bsentity;
+
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codelibs.fess.es.config.allcommon.EsAbstractEntity;
+import org.codelibs.fess.es.config.bsentity.dbmeta.ThumbnailQueueDbm;
+
+/**
+ * ${table.comment}
+ * @author ESFlute (using FreeGen)
+ */
+public class BsThumbnailQueue extends EsAbstractEntity {
+
+    // ===================================================================================
+    //                                                                          Definition
+    //                                                                          ==========
+    private static final long serialVersionUID = 1L;
+    protected static final Class<?> suppressUnusedImportLocalDateTime = LocalDateTime.class;
+
+    // ===================================================================================
+    //                                                                           Attribute
+    //                                                                           =========
+    /** createdBy */
+    protected String createdBy;
+
+    /** createdTime */
+    protected Long createdTime;
+
+    /** generator */
+    protected String generator;
+
+    /** path */
+    protected String path;
+
+    /** url */
+    protected String url;
+
+    // [Referrers] *comment only
+
+    // ===================================================================================
+    //                                                                             DB Meta
+    //                                                                             =======
+    @Override
+    public ThumbnailQueueDbm asDBMeta() {
+        return ThumbnailQueueDbm.getInstance();
+    }
+
+    @Override
+    public String asTableDbName() {
+        return "thumbnail_queue";
+    }
+
+    // ===================================================================================
+    //                                                                              Source
+    //                                                                              ======
+    @Override
+    public Map<String, Object> toSource() {
+        Map<String, Object> sourceMap = new HashMap<>();
+        if (createdBy != null) {
+            sourceMap.put("createdBy", createdBy);
+        }
+        if (createdTime != null) {
+            sourceMap.put("createdTime", createdTime);
+        }
+        if (generator != null) {
+            sourceMap.put("generator", generator);
+        }
+        if (path != null) {
+            sourceMap.put("path", path);
+        }
+        if (url != null) {
+            sourceMap.put("url", url);
+        }
+        return sourceMap;
+    }
+
+    // ===================================================================================
+    //                                                                      Basic Override
+    //                                                                      ==============
+    @Override
+    protected String doBuildColumnString(String dm) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(dm).append(createdBy);
+        sb.append(dm).append(createdTime);
+        sb.append(dm).append(generator);
+        sb.append(dm).append(path);
+        sb.append(dm).append(url);
+        if (sb.length() > dm.length()) {
+            sb.delete(0, dm.length());
+        }
+        sb.insert(0, "{").append("}");
+        return sb.toString();
+    }
+
+    // ===================================================================================
+    //                                                                            Accessor
+    //                                                                            ========
+    public String getCreatedBy() {
+        checkSpecifiedProperty("createdBy");
+        return convertEmptyToNull(createdBy);
+    }
+
+    public void setCreatedBy(String value) {
+        registerModifiedProperty("createdBy");
+        this.createdBy = value;
+    }
+
+    public Long getCreatedTime() {
+        checkSpecifiedProperty("createdTime");
+        return createdTime;
+    }
+
+    public void setCreatedTime(Long value) {
+        registerModifiedProperty("createdTime");
+        this.createdTime = value;
+    }
+
+    public String getGenerator() {
+        checkSpecifiedProperty("generator");
+        return convertEmptyToNull(generator);
+    }
+
+    public void setGenerator(String value) {
+        registerModifiedProperty("generator");
+        this.generator = value;
+    }
+
+    public String getPath() {
+        checkSpecifiedProperty("path");
+        return convertEmptyToNull(path);
+    }
+
+    public void setPath(String value) {
+        registerModifiedProperty("path");
+        this.path = value;
+    }
+
+    public String getUrl() {
+        checkSpecifiedProperty("url");
+        return convertEmptyToNull(url);
+    }
+
+    public void setUrl(String value) {
+        registerModifiedProperty("url");
+        this.url = value;
+    }
+}

+ 239 - 0
src/main/java/org/codelibs/fess/es/config/bsentity/dbmeta/ThumbnailQueueDbm.java

@@ -0,0 +1,239 @@
+/*
+ * Copyright 2012-2016 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.config.bsentity.dbmeta;
+
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
+
+import org.codelibs.fess.es.config.exentity.ThumbnailQueue;
+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 ThumbnailQueueDbm extends AbstractDBMeta {
+
+    protected static final Class<?> suppressUnusedImportLocalDateTime = LocalDateTime.class;
+
+    // ===================================================================================
+    //                                                                           Singleton
+    //                                                                           =========
+    private static final ThumbnailQueueDbm _instance = new ThumbnailQueueDbm();
+
+    private ThumbnailQueueDbm() {
+    }
+
+    public static ThumbnailQueueDbm 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<String, PropertyGateway> _epgMap = newHashMap();
+    {
+        setupEpg(_epgMap, et -> ((ThumbnailQueue) et).getCreatedBy(),
+                (et, vl) -> ((ThumbnailQueue) et).setCreatedBy(DfTypeUtil.toString(vl)), "createdBy");
+        setupEpg(_epgMap, et -> ((ThumbnailQueue) et).getCreatedTime(),
+                (et, vl) -> ((ThumbnailQueue) et).setCreatedTime(DfTypeUtil.toLong(vl)), "createdTime");
+        setupEpg(_epgMap, et -> ((ThumbnailQueue) et).getGenerator(),
+                (et, vl) -> ((ThumbnailQueue) et).setGenerator(DfTypeUtil.toString(vl)), "generator");
+        setupEpg(_epgMap, et -> ((ThumbnailQueue) et).getPath(), (et, vl) -> ((ThumbnailQueue) et).setPath(DfTypeUtil.toString(vl)), "path");
+        setupEpg(_epgMap, et -> ((ThumbnailQueue) et).getUrl(), (et, vl) -> ((ThumbnailQueue) et).setUrl(DfTypeUtil.toString(vl)), "url");
+    }
+
+    @Override
+    public PropertyGateway findPropertyGateway(final String prop) {
+        return doFindEpg(_epgMap, prop);
+    }
+
+    // ===================================================================================
+    //                                                                          Table Info
+    //                                                                          ==========
+    protected final String _tableDbName = "thumbnail_queue";
+    protected final String _tableDispName = "thumbnail_queue";
+    protected final String _tablePropertyName = "ThumbnailQueue";
+
+    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 _columnCreatedBy = cci("createdBy", "createdBy", null, null, String.class, "createdBy", null, false, false,
+            false, "String", 0, 0, null, false, null, null, null, null, null, false);
+    protected final ColumnInfo _columnCreatedTime = cci("createdTime", "createdTime", null, null, Long.class, "createdTime", null, false,
+            false, false, "Long", 0, 0, null, false, null, null, null, null, null, false);
+    protected final ColumnInfo _columnGenerator = cci("generator", "generator", null, null, String.class, "generator", null, false, false,
+            false, "String", 0, 0, null, false, null, null, null, null, null, false);
+    protected final ColumnInfo _columnPath = cci("path", "path", null, null, String.class, "path", null, false, false, false, "String", 0,
+            0, null, false, null, null, null, null, null, false);
+    protected final ColumnInfo _columnUrl = cci("url", "url", null, null, String.class, "url", null, false, false, false, "String", 0, 0,
+            null, false, null, null, null, null, null, false);
+
+    public ColumnInfo columnCreatedBy() {
+        return _columnCreatedBy;
+    }
+
+    public ColumnInfo columnCreatedTime() {
+        return _columnCreatedTime;
+    }
+
+    public ColumnInfo columnGenerator() {
+        return _columnGenerator;
+    }
+
+    public ColumnInfo columnPath() {
+        return _columnPath;
+    }
+
+    public ColumnInfo columnUrl() {
+        return _columnUrl;
+    }
+
+    protected List<ColumnInfo> ccil() {
+        List<ColumnInfo> ls = newArrayList();
+        ls.add(columnCreatedBy());
+        ls.add(columnCreatedTime());
+        ls.add(columnGenerator());
+        ls.add(columnPath());
+        ls.add(columnUrl());
+        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.config.exentity.ThumbnailQueue";
+    }
+
+    @Override
+    public String getConditionBeanTypeName() {
+        return "org.codelibs.fess.es.config.cbean.ThumbnailQueueCB";
+    }
+
+    @Override
+    public String getBehaviorTypeName() {
+        return "org.codelibs.fess.es.config.exbhv.ThumbnailQueueBhv";
+    }
+
+    // ===================================================================================
+    //                                                                         Object Type
+    //                                                                         ===========
+    @Override
+    public Class<? extends Entity> getEntityType() {
+        return ThumbnailQueue.class;
+    }
+
+    // ===================================================================================
+    //                                                                     Object Instance
+    //                                                                     ===============
+    @Override
+    public Entity newEntity() {
+        return new ThumbnailQueue();
+    }
+
+    // ===================================================================================
+    //                                                                   Map Communication
+    //                                                                   =================
+    @Override
+    public void acceptPrimaryKeyMap(Entity entity, Map<String, ? extends Object> primaryKeyMap) {
+    }
+
+    @Override
+    public void acceptAllColumnMap(Entity entity, Map<String, ? extends Object> allColumnMap) {
+    }
+
+    @Override
+    public Map<String, Object> extractPrimaryKeyMap(Entity entity) {
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> extractAllColumnMap(Entity entity) {
+        return null;
+    }
+}

+ 24 - 0
src/main/java/org/codelibs/fess/es/config/cbean/ThumbnailQueueCB.java

@@ -0,0 +1,24 @@
+/*
+ * Copyright 2012-2016 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.config.cbean;
+
+import org.codelibs.fess.es.config.cbean.bs.BsThumbnailQueueCB;
+
+/**
+ * @author ESFlute (using FreeGen)
+ */
+public class ThumbnailQueueCB extends BsThumbnailQueueCB {
+}

+ 170 - 0
src/main/java/org/codelibs/fess/es/config/cbean/bs/BsThumbnailQueueCB.java

@@ -0,0 +1,170 @@
+/*
+ * Copyright 2012-2016 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.config.cbean.bs;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.codelibs.fess.es.config.allcommon.EsAbstractConditionBean;
+import org.codelibs.fess.es.config.bsentity.dbmeta.ThumbnailQueueDbm;
+import org.codelibs.fess.es.config.cbean.ThumbnailQueueCB;
+import org.codelibs.fess.es.config.cbean.cq.ThumbnailQueueCQ;
+import org.codelibs.fess.es.config.cbean.cq.bs.BsThumbnailQueueCQ;
+import org.dbflute.cbean.ConditionQuery;
+import org.elasticsearch.action.search.SearchRequestBuilder;
+import org.elasticsearch.index.query.QueryBuilder;
+
+/**
+ * @author ESFlute (using FreeGen)
+ */
+public class BsThumbnailQueueCB extends EsAbstractConditionBean {
+
+    // ===================================================================================
+    //                                                                           Attribute
+    //                                                                           =========
+    protected BsThumbnailQueueCQ _conditionQuery;
+    protected HpSpecification _specification;
+
+    // ===================================================================================
+    //                                                                             Control
+    //                                                                             =======
+    @Override
+    public ThumbnailQueueDbm asDBMeta() {
+        return ThumbnailQueueDbm.getInstance();
+    }
+
+    @Override
+    public String asTableDbName() {
+        return "thumbnail_queue";
+    }
+
+    @Override
+    public boolean hasSpecifiedColumn() {
+        return _specification != null;
+    }
+
+    @Override
+    public ConditionQuery localCQ() {
+        return doGetConditionQuery();
+    }
+
+    // ===================================================================================
+    //                                                                         Primary Key
+    //                                                                         ===========
+    public ThumbnailQueueCB acceptPK(String id) {
+        assertObjectNotNull("id", id);
+        BsThumbnailQueueCB cb = this;
+        cb.query().docMeta().setId_Equal(id);
+        return (ThumbnailQueueCB) this;
+    }
+
+    @Override
+    public void acceptPrimaryKeyMap(Map<String, ? extends Object> 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 (_specification != null) {
+            builder.setFetchSource(_specification.columnList.toArray(new String[_specification.columnList.size()]), null);
+        }
+
+        return builder;
+    }
+
+    // ===================================================================================
+    //                                                                               Query
+    //                                                                               =====
+    public BsThumbnailQueueCQ query() {
+        assertQueryPurpose();
+        return doGetConditionQuery();
+    }
+
+    protected BsThumbnailQueueCQ doGetConditionQuery() {
+        if (_conditionQuery == null) {
+            _conditionQuery = createLocalCQ();
+        }
+        return _conditionQuery;
+    }
+
+    protected BsThumbnailQueueCQ createLocalCQ() {
+        return new ThumbnailQueueCQ();
+    }
+
+    // ===================================================================================
+    //                                                                             Specify
+    //                                                                             =======
+    public HpSpecification specify() {
+        assertSpecifyPurpose();
+        if (_specification == null) {
+            _specification = new HpSpecification();
+        }
+        return _specification;
+    }
+
+    protected void assertQueryPurpose() {
+    }
+
+    protected void assertSpecifyPurpose() {
+    }
+
+    public static class HpSpecification {
+        private List<String> columnList = new ArrayList<>();
+
+        private void doColumn(String name) {
+            columnList.add(name);
+        }
+
+        public void columnId() {
+            doColumn("_id");
+        }
+
+        public void columnCreatedBy() {
+            doColumn("createdBy");
+        }
+
+        public void columnCreatedTime() {
+            doColumn("createdTime");
+        }
+
+        public void columnGenerator() {
+            doColumn("generator");
+        }
+
+        public void columnPath() {
+            doColumn("path");
+        }
+
+        public void columnUrl() {
+            doColumn("url");
+        }
+    }
+}

+ 24 - 0
src/main/java/org/codelibs/fess/es/config/cbean/cq/ThumbnailQueueCQ.java

@@ -0,0 +1,24 @@
+/*
+ * Copyright 2012-2016 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.config.cbean.cq;
+
+import org.codelibs.fess.es.config.cbean.cq.bs.BsThumbnailQueueCQ;
+
+/**
+ * @author ESFlute (using FreeGen)
+ */
+public class ThumbnailQueueCQ extends BsThumbnailQueueCQ {
+}

+ 1167 - 0
src/main/java/org/codelibs/fess/es/config/cbean/cq/bs/BsThumbnailQueueCQ.java

@@ -0,0 +1,1167 @@
+/*
+ * Copyright 2012-2016 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.config.cbean.cq.bs;
+
+import java.time.LocalDateTime;
+import java.util.Collection;
+
+import org.codelibs.fess.es.config.allcommon.EsAbstractConditionQuery;
+import org.codelibs.fess.es.config.cbean.cq.ThumbnailQueueCQ;
+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.FuzzyQueryBuilder;
+import org.elasticsearch.index.query.IdsQueryBuilder;
+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.TermQueryBuilder;
+import org.elasticsearch.index.query.TermsQueryBuilder;
+import org.elasticsearch.index.query.WildcardQueryBuilder;
+
+/**
+ * @author ESFlute (using FreeGen)
+ */
+public abstract class BsThumbnailQueueCQ extends EsAbstractConditionQuery {
+
+    protected static final Class<?> suppressUnusedImportLocalDateTime = LocalDateTime.class;
+
+    // ===================================================================================
+    //                                                                       Name Override
+    //                                                                       =============
+    @Override
+    public String asTableDbName() {
+        return "thumbnail_queue";
+    }
+
+    @Override
+    public String xgetAliasName() {
+        return "thumbnail_queue";
+    }
+
+    // ===================================================================================
+    //                                                                       Query Control
+    //                                                                       =============
+    public void filtered(FilteredCall<ThumbnailQueueCQ, ThumbnailQueueCQ> filteredLambda) {
+        filtered(filteredLambda, null);
+    }
+
+    public void filtered(FilteredCall<ThumbnailQueueCQ, ThumbnailQueueCQ> filteredLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        bool((must, should, mustNot, filter) -> {
+            filteredLambda.callback(must, filter);
+        }, opLambda);
+    }
+
+    public void not(OperatorCall<ThumbnailQueueCQ> notLambda) {
+        not(notLambda, null);
+    }
+
+    public void not(final OperatorCall<ThumbnailQueueCQ> notLambda, final ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        bool((must, should, mustNot, filter) -> notLambda.callback(mustNot), opLambda);
+    }
+
+    public void bool(BoolCall<ThumbnailQueueCQ> boolLambda) {
+        bool(boolLambda, null);
+    }
+
+    public void bool(BoolCall<ThumbnailQueueCQ> boolLambda, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        ThumbnailQueueCQ mustQuery = new ThumbnailQueueCQ();
+        ThumbnailQueueCQ shouldQuery = new ThumbnailQueueCQ();
+        ThumbnailQueueCQ mustNotQuery = new ThumbnailQueueCQ();
+        ThumbnailQueueCQ filterQuery = new ThumbnailQueueCQ();
+        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<TermQueryBuilder> opLambda) {
+        setId_Term(id, opLambda);
+    }
+
+    public void setId_Term(String id) {
+        setId_Term(id, null);
+    }
+
+    public void setId_Term(String id, ConditionOptionCall<TermQueryBuilder> 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<BoolQueryBuilder> opLambda) {
+        setId_NotTerm(id, opLambda);
+    }
+
+    public void setId_NotTerm(String id, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setId_Term(id), opLambda);
+    }
+
+    public void setId_Terms(Collection<String> idList) {
+        setId_Terms(idList, null);
+    }
+
+    public void setId_Terms(Collection<String> idList, ConditionOptionCall<IdsQueryBuilder> opLambda) {
+        IdsQueryBuilder builder = regIdsQ(idList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setId_InScope(Collection<String> idList) {
+        setId_Terms(idList, null);
+    }
+
+    public void setId_InScope(Collection<String> idList, ConditionOptionCall<IdsQueryBuilder> opLambda) {
+        setId_Terms(idList, opLambda);
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Id_Asc() {
+        regOBA("_id");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Id_Desc() {
+        regOBD("_id");
+        return this;
+    }
+
+    public void setCreatedBy_Equal(String createdBy) {
+        setCreatedBy_Term(createdBy, null);
+    }
+
+    public void setCreatedBy_Equal(String createdBy, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        setCreatedBy_Term(createdBy, opLambda);
+    }
+
+    public void setCreatedBy_Term(String createdBy) {
+        setCreatedBy_Term(createdBy, null);
+    }
+
+    public void setCreatedBy_Term(String createdBy, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        TermQueryBuilder builder = regTermQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_NotEqual(String createdBy) {
+        setCreatedBy_NotTerm(createdBy, null);
+    }
+
+    public void setCreatedBy_NotTerm(String createdBy) {
+        setCreatedBy_NotTerm(createdBy, null);
+    }
+
+    public void setCreatedBy_NotEqual(String createdBy, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        setCreatedBy_NotTerm(createdBy, opLambda);
+    }
+
+    public void setCreatedBy_NotTerm(String createdBy, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setCreatedBy_Term(createdBy), opLambda);
+    }
+
+    public void setCreatedBy_Terms(Collection<String> createdByList) {
+        setCreatedBy_Terms(createdByList, null);
+    }
+
+    public void setCreatedBy_Terms(Collection<String> createdByList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        TermsQueryBuilder builder = regTermsQ("createdBy", createdByList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_InScope(Collection<String> createdByList) {
+        setCreatedBy_Terms(createdByList, null);
+    }
+
+    public void setCreatedBy_InScope(Collection<String> createdByList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        setCreatedBy_Terms(createdByList, opLambda);
+    }
+
+    public void setCreatedBy_Match(String createdBy) {
+        setCreatedBy_Match(createdBy, null);
+    }
+
+    public void setCreatedBy_Match(String createdBy, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_MatchPhrase(String createdBy) {
+        setCreatedBy_MatchPhrase(createdBy, null);
+    }
+
+    public void setCreatedBy_MatchPhrase(String createdBy, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhraseQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_MatchPhrasePrefix(String createdBy) {
+        setCreatedBy_MatchPhrasePrefix(createdBy, null);
+    }
+
+    public void setCreatedBy_MatchPhrasePrefix(String createdBy, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhrasePrefixQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_Fuzzy(String createdBy) {
+        setCreatedBy_Fuzzy(createdBy, null);
+    }
+
+    public void setCreatedBy_Fuzzy(String createdBy, ConditionOptionCall<FuzzyQueryBuilder> opLambda) {
+        FuzzyQueryBuilder builder = regFuzzyQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_Prefix(String createdBy) {
+        setCreatedBy_Prefix(createdBy, null);
+    }
+
+    public void setCreatedBy_Prefix(String createdBy, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
+        PrefixQueryBuilder builder = regPrefixQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_Wildcard(String createdBy) {
+        setCreatedBy_Wildcard(createdBy, null);
+    }
+
+    public void setCreatedBy_Wildcard(String createdBy, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
+        WildcardQueryBuilder builder = regWildcardQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_Regexp(String createdBy) {
+        setCreatedBy_Regexp(createdBy, null);
+    }
+
+    public void setCreatedBy_Regexp(String createdBy, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
+        RegexpQueryBuilder builder = regRegexpQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_GreaterThan(String createdBy) {
+        setCreatedBy_GreaterThan(createdBy, null);
+    }
+
+    public void setCreatedBy_GreaterThan(String createdBy, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdBy", ConditionKey.CK_GREATER_THAN, createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_LessThan(String createdBy) {
+        setCreatedBy_LessThan(createdBy, null);
+    }
+
+    public void setCreatedBy_LessThan(String createdBy, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdBy", ConditionKey.CK_LESS_THAN, createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_GreaterEqual(String createdBy) {
+        setCreatedBy_GreaterEqual(createdBy, null);
+    }
+
+    public void setCreatedBy_GreaterEqual(String createdBy, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdBy", ConditionKey.CK_GREATER_EQUAL, createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_LessEqual(String createdBy) {
+        setCreatedBy_LessEqual(createdBy, null);
+    }
+
+    public void setCreatedBy_LessEqual(String createdBy, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdBy", ConditionKey.CK_LESS_EQUAL, createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_Exists() {
+        setCreatedBy_Exists(null);
+    }
+
+    public void setCreatedBy_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
+        ExistsQueryBuilder builder = regExistsQ("createdBy");
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedBy_CommonTerms(String createdBy) {
+        setCreatedBy_CommonTerms(createdBy, null);
+    }
+
+    public void setCreatedBy_CommonTerms(String createdBy, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
+        CommonTermsQueryBuilder builder = regCommonTermsQ("createdBy", createdBy);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_CreatedBy_Asc() {
+        regOBA("createdBy");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_CreatedBy_Desc() {
+        regOBD("createdBy");
+        return this;
+    }
+
+    public void setCreatedTime_Equal(Long createdTime) {
+        setCreatedTime_Term(createdTime, null);
+    }
+
+    public void setCreatedTime_Equal(Long createdTime, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        setCreatedTime_Term(createdTime, opLambda);
+    }
+
+    public void setCreatedTime_Term(Long createdTime) {
+        setCreatedTime_Term(createdTime, null);
+    }
+
+    public void setCreatedTime_Term(Long createdTime, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        TermQueryBuilder builder = regTermQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_NotEqual(Long createdTime) {
+        setCreatedTime_NotTerm(createdTime, null);
+    }
+
+    public void setCreatedTime_NotTerm(Long createdTime) {
+        setCreatedTime_NotTerm(createdTime, null);
+    }
+
+    public void setCreatedTime_NotEqual(Long createdTime, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        setCreatedTime_NotTerm(createdTime, opLambda);
+    }
+
+    public void setCreatedTime_NotTerm(Long createdTime, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setCreatedTime_Term(createdTime), opLambda);
+    }
+
+    public void setCreatedTime_Terms(Collection<Long> createdTimeList) {
+        setCreatedTime_Terms(createdTimeList, null);
+    }
+
+    public void setCreatedTime_Terms(Collection<Long> createdTimeList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        TermsQueryBuilder builder = regTermsQ("createdTime", createdTimeList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_InScope(Collection<Long> createdTimeList) {
+        setCreatedTime_Terms(createdTimeList, null);
+    }
+
+    public void setCreatedTime_InScope(Collection<Long> createdTimeList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        setCreatedTime_Terms(createdTimeList, opLambda);
+    }
+
+    public void setCreatedTime_Match(Long createdTime) {
+        setCreatedTime_Match(createdTime, null);
+    }
+
+    public void setCreatedTime_Match(Long createdTime, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_MatchPhrase(Long createdTime) {
+        setCreatedTime_MatchPhrase(createdTime, null);
+    }
+
+    public void setCreatedTime_MatchPhrase(Long createdTime, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhraseQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_MatchPhrasePrefix(Long createdTime) {
+        setCreatedTime_MatchPhrasePrefix(createdTime, null);
+    }
+
+    public void setCreatedTime_MatchPhrasePrefix(Long createdTime, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhrasePrefixQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_Fuzzy(Long createdTime) {
+        setCreatedTime_Fuzzy(createdTime, null);
+    }
+
+    public void setCreatedTime_Fuzzy(Long createdTime, ConditionOptionCall<FuzzyQueryBuilder> opLambda) {
+        FuzzyQueryBuilder builder = regFuzzyQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_GreaterThan(Long createdTime) {
+        setCreatedTime_GreaterThan(createdTime, null);
+    }
+
+    public void setCreatedTime_GreaterThan(Long createdTime, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdTime", ConditionKey.CK_GREATER_THAN, createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_LessThan(Long createdTime) {
+        setCreatedTime_LessThan(createdTime, null);
+    }
+
+    public void setCreatedTime_LessThan(Long createdTime, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdTime", ConditionKey.CK_LESS_THAN, createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_GreaterEqual(Long createdTime) {
+        setCreatedTime_GreaterEqual(createdTime, null);
+    }
+
+    public void setCreatedTime_GreaterEqual(Long createdTime, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdTime", ConditionKey.CK_GREATER_EQUAL, createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_LessEqual(Long createdTime) {
+        setCreatedTime_LessEqual(createdTime, null);
+    }
+
+    public void setCreatedTime_LessEqual(Long createdTime, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("createdTime", ConditionKey.CK_LESS_EQUAL, createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_Exists() {
+        setCreatedTime_Exists(null);
+    }
+
+    public void setCreatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
+        ExistsQueryBuilder builder = regExistsQ("createdTime");
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setCreatedTime_CommonTerms(Long createdTime) {
+        setCreatedTime_CommonTerms(createdTime, null);
+    }
+
+    public void setCreatedTime_CommonTerms(Long createdTime, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
+        CommonTermsQueryBuilder builder = regCommonTermsQ("createdTime", createdTime);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_CreatedTime_Asc() {
+        regOBA("createdTime");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_CreatedTime_Desc() {
+        regOBD("createdTime");
+        return this;
+    }
+
+    public void setGenerator_Equal(String generator) {
+        setGenerator_Term(generator, null);
+    }
+
+    public void setGenerator_Equal(String generator, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        setGenerator_Term(generator, opLambda);
+    }
+
+    public void setGenerator_Term(String generator) {
+        setGenerator_Term(generator, null);
+    }
+
+    public void setGenerator_Term(String generator, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        TermQueryBuilder builder = regTermQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_NotEqual(String generator) {
+        setGenerator_NotTerm(generator, null);
+    }
+
+    public void setGenerator_NotTerm(String generator) {
+        setGenerator_NotTerm(generator, null);
+    }
+
+    public void setGenerator_NotEqual(String generator, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        setGenerator_NotTerm(generator, opLambda);
+    }
+
+    public void setGenerator_NotTerm(String generator, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setGenerator_Term(generator), opLambda);
+    }
+
+    public void setGenerator_Terms(Collection<String> generatorList) {
+        setGenerator_Terms(generatorList, null);
+    }
+
+    public void setGenerator_Terms(Collection<String> generatorList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        TermsQueryBuilder builder = regTermsQ("generator", generatorList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_InScope(Collection<String> generatorList) {
+        setGenerator_Terms(generatorList, null);
+    }
+
+    public void setGenerator_InScope(Collection<String> generatorList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        setGenerator_Terms(generatorList, opLambda);
+    }
+
+    public void setGenerator_Match(String generator) {
+        setGenerator_Match(generator, null);
+    }
+
+    public void setGenerator_Match(String generator, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_MatchPhrase(String generator) {
+        setGenerator_MatchPhrase(generator, null);
+    }
+
+    public void setGenerator_MatchPhrase(String generator, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhraseQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_MatchPhrasePrefix(String generator) {
+        setGenerator_MatchPhrasePrefix(generator, null);
+    }
+
+    public void setGenerator_MatchPhrasePrefix(String generator, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhrasePrefixQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_Fuzzy(String generator) {
+        setGenerator_Fuzzy(generator, null);
+    }
+
+    public void setGenerator_Fuzzy(String generator, ConditionOptionCall<FuzzyQueryBuilder> opLambda) {
+        FuzzyQueryBuilder builder = regFuzzyQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_Prefix(String generator) {
+        setGenerator_Prefix(generator, null);
+    }
+
+    public void setGenerator_Prefix(String generator, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
+        PrefixQueryBuilder builder = regPrefixQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_Wildcard(String generator) {
+        setGenerator_Wildcard(generator, null);
+    }
+
+    public void setGenerator_Wildcard(String generator, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
+        WildcardQueryBuilder builder = regWildcardQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_Regexp(String generator) {
+        setGenerator_Regexp(generator, null);
+    }
+
+    public void setGenerator_Regexp(String generator, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
+        RegexpQueryBuilder builder = regRegexpQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_GreaterThan(String generator) {
+        setGenerator_GreaterThan(generator, null);
+    }
+
+    public void setGenerator_GreaterThan(String generator, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("generator", ConditionKey.CK_GREATER_THAN, generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_LessThan(String generator) {
+        setGenerator_LessThan(generator, null);
+    }
+
+    public void setGenerator_LessThan(String generator, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("generator", ConditionKey.CK_LESS_THAN, generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_GreaterEqual(String generator) {
+        setGenerator_GreaterEqual(generator, null);
+    }
+
+    public void setGenerator_GreaterEqual(String generator, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("generator", ConditionKey.CK_GREATER_EQUAL, generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_LessEqual(String generator) {
+        setGenerator_LessEqual(generator, null);
+    }
+
+    public void setGenerator_LessEqual(String generator, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("generator", ConditionKey.CK_LESS_EQUAL, generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_Exists() {
+        setGenerator_Exists(null);
+    }
+
+    public void setGenerator_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
+        ExistsQueryBuilder builder = regExistsQ("generator");
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setGenerator_CommonTerms(String generator) {
+        setGenerator_CommonTerms(generator, null);
+    }
+
+    public void setGenerator_CommonTerms(String generator, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
+        CommonTermsQueryBuilder builder = regCommonTermsQ("generator", generator);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Generator_Asc() {
+        regOBA("generator");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Generator_Desc() {
+        regOBD("generator");
+        return this;
+    }
+
+    public void setPath_Equal(String path) {
+        setPath_Term(path, null);
+    }
+
+    public void setPath_Equal(String path, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        setPath_Term(path, opLambda);
+    }
+
+    public void setPath_Term(String path) {
+        setPath_Term(path, null);
+    }
+
+    public void setPath_Term(String path, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        TermQueryBuilder builder = regTermQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_NotEqual(String path) {
+        setPath_NotTerm(path, null);
+    }
+
+    public void setPath_NotTerm(String path) {
+        setPath_NotTerm(path, null);
+    }
+
+    public void setPath_NotEqual(String path, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        setPath_NotTerm(path, opLambda);
+    }
+
+    public void setPath_NotTerm(String path, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setPath_Term(path), opLambda);
+    }
+
+    public void setPath_Terms(Collection<String> pathList) {
+        setPath_Terms(pathList, null);
+    }
+
+    public void setPath_Terms(Collection<String> pathList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        TermsQueryBuilder builder = regTermsQ("path", pathList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_InScope(Collection<String> pathList) {
+        setPath_Terms(pathList, null);
+    }
+
+    public void setPath_InScope(Collection<String> pathList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        setPath_Terms(pathList, opLambda);
+    }
+
+    public void setPath_Match(String path) {
+        setPath_Match(path, null);
+    }
+
+    public void setPath_Match(String path, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_MatchPhrase(String path) {
+        setPath_MatchPhrase(path, null);
+    }
+
+    public void setPath_MatchPhrase(String path, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhraseQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_MatchPhrasePrefix(String path) {
+        setPath_MatchPhrasePrefix(path, null);
+    }
+
+    public void setPath_MatchPhrasePrefix(String path, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhrasePrefixQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_Fuzzy(String path) {
+        setPath_Fuzzy(path, null);
+    }
+
+    public void setPath_Fuzzy(String path, ConditionOptionCall<FuzzyQueryBuilder> opLambda) {
+        FuzzyQueryBuilder builder = regFuzzyQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_Prefix(String path) {
+        setPath_Prefix(path, null);
+    }
+
+    public void setPath_Prefix(String path, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
+        PrefixQueryBuilder builder = regPrefixQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_Wildcard(String path) {
+        setPath_Wildcard(path, null);
+    }
+
+    public void setPath_Wildcard(String path, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
+        WildcardQueryBuilder builder = regWildcardQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_Regexp(String path) {
+        setPath_Regexp(path, null);
+    }
+
+    public void setPath_Regexp(String path, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
+        RegexpQueryBuilder builder = regRegexpQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_GreaterThan(String path) {
+        setPath_GreaterThan(path, null);
+    }
+
+    public void setPath_GreaterThan(String path, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("path", ConditionKey.CK_GREATER_THAN, path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_LessThan(String path) {
+        setPath_LessThan(path, null);
+    }
+
+    public void setPath_LessThan(String path, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("path", ConditionKey.CK_LESS_THAN, path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_GreaterEqual(String path) {
+        setPath_GreaterEqual(path, null);
+    }
+
+    public void setPath_GreaterEqual(String path, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("path", ConditionKey.CK_GREATER_EQUAL, path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_LessEqual(String path) {
+        setPath_LessEqual(path, null);
+    }
+
+    public void setPath_LessEqual(String path, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("path", ConditionKey.CK_LESS_EQUAL, path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_Exists() {
+        setPath_Exists(null);
+    }
+
+    public void setPath_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
+        ExistsQueryBuilder builder = regExistsQ("path");
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setPath_CommonTerms(String path) {
+        setPath_CommonTerms(path, null);
+    }
+
+    public void setPath_CommonTerms(String path, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
+        CommonTermsQueryBuilder builder = regCommonTermsQ("path", path);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Path_Asc() {
+        regOBA("path");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Path_Desc() {
+        regOBD("path");
+        return this;
+    }
+
+    public void setUrl_Equal(String url) {
+        setUrl_Term(url, null);
+    }
+
+    public void setUrl_Equal(String url, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        setUrl_Term(url, opLambda);
+    }
+
+    public void setUrl_Term(String url) {
+        setUrl_Term(url, null);
+    }
+
+    public void setUrl_Term(String url, ConditionOptionCall<TermQueryBuilder> opLambda) {
+        TermQueryBuilder builder = regTermQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_NotEqual(String url) {
+        setUrl_NotTerm(url, null);
+    }
+
+    public void setUrl_NotTerm(String url) {
+        setUrl_NotTerm(url, null);
+    }
+
+    public void setUrl_NotEqual(String url, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        setUrl_NotTerm(url, opLambda);
+    }
+
+    public void setUrl_NotTerm(String url, ConditionOptionCall<BoolQueryBuilder> opLambda) {
+        not(not -> not.setUrl_Term(url), opLambda);
+    }
+
+    public void setUrl_Terms(Collection<String> urlList) {
+        setUrl_Terms(urlList, null);
+    }
+
+    public void setUrl_Terms(Collection<String> urlList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        TermsQueryBuilder builder = regTermsQ("url", urlList);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_InScope(Collection<String> urlList) {
+        setUrl_Terms(urlList, null);
+    }
+
+    public void setUrl_InScope(Collection<String> urlList, ConditionOptionCall<TermsQueryBuilder> opLambda) {
+        setUrl_Terms(urlList, opLambda);
+    }
+
+    public void setUrl_Match(String url) {
+        setUrl_Match(url, null);
+    }
+
+    public void setUrl_Match(String url, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_MatchPhrase(String url) {
+        setUrl_MatchPhrase(url, null);
+    }
+
+    public void setUrl_MatchPhrase(String url, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhraseQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_MatchPhrasePrefix(String url) {
+        setUrl_MatchPhrasePrefix(url, null);
+    }
+
+    public void setUrl_MatchPhrasePrefix(String url, ConditionOptionCall<MatchQueryBuilder> opLambda) {
+        MatchQueryBuilder builder = regMatchPhrasePrefixQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_Fuzzy(String url) {
+        setUrl_Fuzzy(url, null);
+    }
+
+    public void setUrl_Fuzzy(String url, ConditionOptionCall<FuzzyQueryBuilder> opLambda) {
+        FuzzyQueryBuilder builder = regFuzzyQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_Prefix(String url) {
+        setUrl_Prefix(url, null);
+    }
+
+    public void setUrl_Prefix(String url, ConditionOptionCall<PrefixQueryBuilder> opLambda) {
+        PrefixQueryBuilder builder = regPrefixQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_Wildcard(String url) {
+        setUrl_Wildcard(url, null);
+    }
+
+    public void setUrl_Wildcard(String url, ConditionOptionCall<WildcardQueryBuilder> opLambda) {
+        WildcardQueryBuilder builder = regWildcardQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_Regexp(String url) {
+        setUrl_Regexp(url, null);
+    }
+
+    public void setUrl_Regexp(String url, ConditionOptionCall<RegexpQueryBuilder> opLambda) {
+        RegexpQueryBuilder builder = regRegexpQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_GreaterThan(String url) {
+        setUrl_GreaterThan(url, null);
+    }
+
+    public void setUrl_GreaterThan(String url, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("url", ConditionKey.CK_GREATER_THAN, url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_LessThan(String url) {
+        setUrl_LessThan(url, null);
+    }
+
+    public void setUrl_LessThan(String url, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("url", ConditionKey.CK_LESS_THAN, url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_GreaterEqual(String url) {
+        setUrl_GreaterEqual(url, null);
+    }
+
+    public void setUrl_GreaterEqual(String url, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("url", ConditionKey.CK_GREATER_EQUAL, url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_LessEqual(String url) {
+        setUrl_LessEqual(url, null);
+    }
+
+    public void setUrl_LessEqual(String url, ConditionOptionCall<RangeQueryBuilder> opLambda) {
+        RangeQueryBuilder builder = regRangeQ("url", ConditionKey.CK_LESS_EQUAL, url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_Exists() {
+        setUrl_Exists(null);
+    }
+
+    public void setUrl_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
+        ExistsQueryBuilder builder = regExistsQ("url");
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public void setUrl_CommonTerms(String url) {
+        setUrl_CommonTerms(url, null);
+    }
+
+    public void setUrl_CommonTerms(String url, ConditionOptionCall<CommonTermsQueryBuilder> opLambda) {
+        CommonTermsQueryBuilder builder = regCommonTermsQ("url", url);
+        if (opLambda != null) {
+            opLambda.callback(builder);
+        }
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Url_Asc() {
+        regOBA("url");
+        return this;
+    }
+
+    public BsThumbnailQueueCQ addOrderBy_Url_Desc() {
+        regOBD("url");
+        return this;
+    }
+
+}

+ 25 - 0
src/main/java/org/codelibs/fess/es/config/exbhv/ThumbnailQueueBhv.java

@@ -0,0 +1,25 @@
+/*
+ * Copyright 2012-2016 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.config.exbhv;
+
+import org.codelibs.fess.es.config.bsbhv.BsThumbnailQueueBhv;
+
+/**
+ * @author FreeGen
+ */
+public class ThumbnailQueueBhv extends BsThumbnailQueueBhv {
+
+}

+ 48 - 0
src/main/java/org/codelibs/fess/es/config/exentity/ThumbnailQueue.java

@@ -0,0 +1,48 @@
+/*
+ * Copyright 2012-2016 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.config.exentity;
+
+import org.codelibs.fess.es.config.bsentity.BsThumbnailQueue;
+
+/**
+ * @author ESFlute (using FreeGen)
+ */
+public class ThumbnailQueue extends BsThumbnailQueue {
+
+    private static final long serialVersionUID = 1L;
+
+    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);
+    }
+
+    @Override
+    public String toString() {
+        return "ThumbnailQueue [createdBy=" + createdBy + ", createdTime=" + createdTime + ", generator=" + generator + ", path=" + path
+                + ", url=" + url + "]";
+    }
+}

+ 40 - 0
src/main/java/org/codelibs/fess/job/GenerateThumbnailJob.java

@@ -0,0 +1,40 @@
+/*
+ * Copyright 2012-2016 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.job;
+
+import org.codelibs.fess.util.ComponentUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class GenerateThumbnailJob {
+    private static final Logger logger = LoggerFactory.getLogger(GenerateThumbnailJob.class);
+
+    public String execute() {
+        int totalCount = 0;
+        int count = 1;
+        try {
+            while (count != 0) {
+                count = ComponentUtil.getThumbnailManager().generate();
+                totalCount += count;
+            }
+            return "Created " + totalCount + " thumbnail files.";
+        } catch (final Exception e) {
+            logger.error("Failed to purge user info.", e);
+            return e.getMessage();
+        }
+    }
+
+}

+ 26 - 0
src/main/java/org/codelibs/fess/mylasta/direction/FessConfig.java

@@ -637,6 +637,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
     /** The key of the configuration. e.g. 1000 */
     /** The key of the configuration. e.g. 1000 */
     String PAGE_DICTIONARY_MAX_FETCH_SIZE = "page.dictionary.max.fetch.size";
     String PAGE_DICTIONARY_MAX_FETCH_SIZE = "page.dictionary.max.fetch.size";
 
 
+    /** The key of the configuration. e.g. 100 */
+    String PAGE_THUMBNAIL_QUEUE_MAX_FETCH_SIZE = "page.thumbnail.queue.max.fetch.size";
+
     /** The key of the configuration. e.g. 0 */
     /** The key of the configuration. e.g. 0 */
     String PAGING_SEARCH_PAGE_START = "paging.search.page.start";
     String PAGING_SEARCH_PAGE_START = "paging.search.page.start";
 
 
@@ -3084,6 +3087,21 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
      */
      */
     Integer getPageDictionaryMaxFetchSizeAsInteger();
     Integer getPageDictionaryMaxFetchSizeAsInteger();
 
 
+    /**
+     * Get the value for the key 'page.thumbnail.queue.max.fetch.size'. <br>
+     * The value is, e.g. 100 <br>
+     * @return The value of found property. (NotNull: if not found, exception but basically no way)
+     */
+    String getPageThumbnailQueueMaxFetchSize();
+
+    /**
+     * Get the value for the key 'page.thumbnail.queue.max.fetch.size' as {@link Integer}. <br>
+     * The value is, e.g. 100 <br>
+     * @return The value of found property. (NotNull: if not found, exception but basically no way)
+     * @throws NumberFormatException When the property is not integer.
+     */
+    Integer getPageThumbnailQueueMaxFetchSizeAsInteger();
+
     /**
     /**
      * Get the value for the key 'paging.search.page.start'. <br>
      * Get the value for the key 'paging.search.page.start'. <br>
      * The value is, e.g. 0 <br>
      * The value is, e.g. 0 <br>
@@ -5340,6 +5358,14 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
             return getAsInteger(FessConfig.PAGE_DICTIONARY_MAX_FETCH_SIZE);
             return getAsInteger(FessConfig.PAGE_DICTIONARY_MAX_FETCH_SIZE);
         }
         }
 
 
+        public String getPageThumbnailQueueMaxFetchSize() {
+            return get(FessConfig.PAGE_THUMBNAIL_QUEUE_MAX_FETCH_SIZE);
+        }
+
+        public Integer getPageThumbnailQueueMaxFetchSizeAsInteger() {
+            return getAsInteger(FessConfig.PAGE_THUMBNAIL_QUEUE_MAX_FETCH_SIZE);
+        }
+
         public String getPagingSearchPageStart() {
         public String getPagingSearchPageStart() {
             return get(FessConfig.PAGING_SEARCH_PAGE_START);
             return get(FessConfig.PAGING_SEARCH_PAGE_START);
         }
         }

+ 2 - 0
src/main/java/org/codelibs/fess/thumbnail/ThumbnailGenerator.java

@@ -20,6 +20,8 @@ import java.util.Map;
 
 
 public interface ThumbnailGenerator {
 public interface ThumbnailGenerator {
 
 
+    String getName();
+
     boolean generate(String url, File outputFile);
     boolean generate(String url, File outputFile);
 
 
     boolean isTarget(Map<String, Object> docMap);
     boolean isTarget(Map<String, Object> docMap);

+ 70 - 70
src/main/java/org/codelibs/fess/thumbnail/ThumbnailManager.java

@@ -28,6 +28,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
 
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import javax.annotation.PreDestroy;
@@ -37,7 +39,10 @@ import javax.servlet.http.HttpSession;
 
 
 import org.codelibs.core.collection.LruHashMap;
 import org.codelibs.core.collection.LruHashMap;
 import org.codelibs.core.lang.StringUtil;
 import org.codelibs.core.lang.StringUtil;
+import org.codelibs.core.misc.Tuple3;
 import org.codelibs.fess.Constants;
 import org.codelibs.fess.Constants;
+import org.codelibs.fess.es.config.exbhv.ThumbnailQueueBhv;
+import org.codelibs.fess.es.config.exentity.ThumbnailQueue;
 import org.codelibs.fess.exception.FessSystemException;
 import org.codelibs.fess.exception.FessSystemException;
 import org.codelibs.fess.exception.JobProcessingException;
 import org.codelibs.fess.exception.JobProcessingException;
 import org.codelibs.fess.mylasta.direction.FessConfig;
 import org.codelibs.fess.mylasta.direction.FessConfig;
@@ -61,7 +66,7 @@ public class ThumbnailManager {
 
 
     private final List<ThumbnailGenerator> generatorList = new ArrayList<>();
     private final List<ThumbnailGenerator> generatorList = new ArrayList<>();
 
 
-    private BlockingQueue<ThumbnailTask> thumbnailTaskQueue;
+    private BlockingQueue<Tuple3<String, String, String>> thumbnailTaskQueue;
 
 
     private volatile boolean generating;
     private volatile boolean generating;
 
 
@@ -75,6 +80,10 @@ public class ThumbnailManager {
 
 
     protected int thumbnailTaskQueueSize = 10000;
     protected int thumbnailTaskQueueSize = 10000;
 
 
+    protected int thumbnailTaskBulkSize = 100;
+
+    protected long thumbnailTaskQueueTimeout = 60 * 1000L;
+
     protected long noImageExpired = 24 * 60 * 60 * 1000L; // 24 hours
     protected long noImageExpired = 24 * 60 * 60 * 1000L; // 24 hours
 
 
     @PostConstruct
     @PostConstruct
@@ -104,9 +113,20 @@ public class ThumbnailManager {
         thumbnailTaskQueue = new LinkedBlockingQueue<>(thumbnailTaskQueueSize);
         thumbnailTaskQueue = new LinkedBlockingQueue<>(thumbnailTaskQueueSize);
         generating = true;
         generating = true;
         thumbnailGeneratorThread = new Thread((Runnable) () -> {
         thumbnailGeneratorThread = new Thread((Runnable) () -> {
+            final List<Tuple3<String, String, String>> taskList = new ArrayList<>();
             while (generating) {
             while (generating) {
                 try {
                 try {
-                    thumbnailTaskQueue.take().generate();
+                    Tuple3<String, String, String> task = thumbnailTaskQueue.poll(thumbnailTaskQueueTimeout, TimeUnit.MILLISECONDS);
+                    if (task == null) {
+                        if (!taskList.isEmpty()) {
+                            storeQueue(taskList);
+                        }
+                    } else {
+                        taskList.add(task);
+                        if (taskList.size() > thumbnailTaskBulkSize) {
+                            storeQueue(taskList);
+                        }
+                    }
                 } catch (final InterruptedException e) {
                 } catch (final InterruptedException e) {
                     logger.debug("Interupted task.", e);
                     logger.debug("Interupted task.", e);
                 } catch (final Exception e) {
                 } catch (final Exception e) {
@@ -137,24 +157,64 @@ public class ThumbnailManager {
         });
         });
     }
     }
 
 
-    public void generate(final Map<String, Object> docMap) {
+    protected void storeQueue(final List<Tuple3<String, String, String>> taskList) {
+        List<ThumbnailQueue> list = taskList.stream().filter(entity -> entity != null).map(task -> {
+            ThumbnailQueue entity = new ThumbnailQueue();
+            entity.setGenerator(task.getValue1());
+            entity.setUrl(task.getValue2());
+            entity.setPath(task.getValue3());
+            return entity;
+        }).collect(Collectors.toList());
+        taskList.clear();
+        final ThumbnailQueueBhv thumbnailQueueBhv = ComponentUtil.getComponent(ThumbnailQueueBhv.class);
+        thumbnailQueueBhv.batchInsert(list);
+    }
+
+    public int generate() {
         final FessConfig fessConfig = ComponentUtil.getFessConfig();
         final FessConfig fessConfig = ComponentUtil.getFessConfig();
-        for (final ThumbnailGenerator generator : generatorList) {
-            if (generator.isTarget(docMap)) {
-                final String url = DocumentUtil.getValue(docMap, fessConfig.getIndexFieldUrl(), String.class);
-                final String path = getImageFilename(docMap);
-                final File outputFile = new File(baseDir, path);
+        final List<String> idList = new ArrayList<>();
+        final ThumbnailQueueBhv thumbnailQueueBhv = ComponentUtil.getComponent(ThumbnailQueueBhv.class);
+        thumbnailQueueBhv.selectList(cb -> {
+            cb.query().addOrderBy_CreatedTime_Asc();
+            cb.fetchFirst(fessConfig.getPageThumbnailQueueMaxFetchSizeAsInteger());
+        }).forEach(entity -> {
+            idList.add(entity.getId());
+            final String generatorName = entity.getGenerator();
+            try {
+                final ThumbnailGenerator generator = ComponentUtil.getComponent(generatorName);
+                final File outputFile = new File(baseDir, entity.getPath());
                 final File noImageFile = new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX);
                 final File noImageFile = new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX);
                 if (!noImageFile.isFile() || System.currentTimeMillis() - noImageFile.lastModified() > noImageExpired) {
                 if (!noImageFile.isFile() || System.currentTimeMillis() - noImageFile.lastModified() > noImageExpired) {
                     if (noImageFile.isFile() && !noImageFile.delete()) {
                     if (noImageFile.isFile() && !noImageFile.delete()) {
                         logger.warn("Failed to delete " + noImageFile.getAbsolutePath());
                         logger.warn("Failed to delete " + noImageFile.getAbsolutePath());
                     }
                     }
-                    if (!thumbnailTaskQueue.offer(new ThumbnailTask(url, outputFile, generator))) {
-                        logger.warn("Failed to offer a thumbnail task: " + url + " -> " + path);
+                    if (!generator.generate(entity.getUrl(), outputFile)) {
+                        new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX).setLastModified(System.currentTimeMillis());
                     }
                     }
                 } else if (logger.isDebugEnabled()) {
                 } else if (logger.isDebugEnabled()) {
                     logger.debug("No image file exists: " + noImageFile.getAbsolutePath());
                     logger.debug("No image file exists: " + noImageFile.getAbsolutePath());
                 }
                 }
+            } catch (final Exception e) {
+                logger.warn("Failed to create thumbnail for " + entity, e);
+            }
+        });
+        if (!idList.isEmpty()) {
+            thumbnailQueueBhv.queryDelete(cb -> {
+                cb.query().setId_InScope(idList);
+            });
+            thumbnailQueueBhv.refresh();
+        }
+        return idList.size();
+    }
+
+    public void offer(final Map<String, Object> docMap) {
+        final FessConfig fessConfig = ComponentUtil.getFessConfig();
+        for (final ThumbnailGenerator generator : generatorList) {
+            if (generator.isTarget(docMap)) {
+                final String url = DocumentUtil.getValue(docMap, fessConfig.getIndexFieldUrl(), String.class);
+                final String path = getImageFilename(docMap);
+                Tuple3<String, String, String> task = new Tuple3<String, String, String>(generator.getName(), url, path);
+                thumbnailTaskQueue.offer(task);
                 break;
                 break;
             }
             }
         }
         }
@@ -283,66 +343,6 @@ public class ThumbnailManager {
 
 
     }
     }
 
 
-    protected static class ThumbnailTask {
-
-        String url;
-
-        File outputFile;
-
-        ThumbnailGenerator generator;
-
-        protected ThumbnailTask(final String url, final File outputFile, final ThumbnailGenerator generator) {
-            this.url = url;
-            this.outputFile = outputFile;
-            this.generator = generator;
-        }
-
-        public void generate() {
-            if (!generator.generate(url, outputFile)) {
-                new File(outputFile.getAbsolutePath() + NOIMAGE_FILE_SUFFIX).setLastModified(System.currentTimeMillis());
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + (outputFile == null ? 0 : outputFile.hashCode());
-            result = prime * result + (url == null ? 0 : url.hashCode());
-            return result;
-        }
-
-        @Override
-        public boolean equals(final Object obj) {
-            if (this == obj) {
-                return true;
-            }
-            if (obj == null) {
-                return false;
-            }
-            if (getClass() != obj.getClass()) {
-                return false;
-            }
-            final ThumbnailTask other = (ThumbnailTask) obj;
-            if (outputFile == null) {
-                if (other.outputFile != null) {
-                    return false;
-                }
-            } else if (!outputFile.equals(other.outputFile)) {
-                return false;
-            }
-            if (url == null) {
-                if (other.url != null) {
-                    return false;
-                }
-            } else if (!url.equals(other.url)) {
-                return false;
-            }
-            return true;
-        }
-
-    }
-
     public void setThumbnailPathCacheSize(final int thumbnailPathCacheSize) {
     public void setThumbnailPathCacheSize(final int thumbnailPathCacheSize) {
         this.thumbnailPathCacheSize = thumbnailPathCacheSize;
         this.thumbnailPathCacheSize = thumbnailPathCacheSize;
     }
     }

+ 10 - 0
src/main/java/org/codelibs/fess/thumbnail/impl/BaseThumbnailGenerator.java

@@ -41,6 +41,8 @@ public abstract class BaseThumbnailGenerator implements ThumbnailGenerator {
 
 
     protected Map<String, String> filePathMap = new HashMap<>();
     protected Map<String, String> filePathMap = new HashMap<>();
 
 
+    protected String name;
+
     public void addCondition(final String key, final String regex) {
     public void addCondition(final String key, final String regex) {
         conditionMap.put(key, regex);
         conditionMap.put(key, regex);
     }
     }
@@ -103,4 +105,12 @@ public abstract class BaseThumbnailGenerator implements ThumbnailGenerator {
         this.generatorList = generatorList;
         this.generatorList = generatorList;
     }
     }
 
 
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
 }
 }

+ 3 - 0
src/main/resources/esclient.xml

@@ -204,6 +204,9 @@
 		<postConstruct name="addIndexConfig">
 		<postConstruct name="addIndexConfig">
 			<arg>".fess_config/web_config_to_role"</arg>
 			<arg>".fess_config/web_config_to_role"</arg>
 		</postConstruct>
 		</postConstruct>
+		<postConstruct name="addIndexConfig">
+			<arg>".fess_config/thumbnail_queue"</arg>
+		</postConstruct>
 		<!-- .fess_user index -->
 		<!-- .fess_user index -->
 		<postConstruct name="addIndexConfig">
 		<postConstruct name="addIndexConfig">
 			<arg>".fess_user/user"</arg>
 			<arg>".fess_user/user"</arg>

+ 4 - 3
src/main/resources/esflute_config.xml

@@ -9,6 +9,7 @@
 
 
     <!-- The components of Behavior. -->
     <!-- The components of Behavior. -->
     <component name="accessTokenBhv" class="org.codelibs.fess.es.config.exbhv.AccessTokenBhv"/>
     <component name="accessTokenBhv" class="org.codelibs.fess.es.config.exbhv.AccessTokenBhv"/>
+    <component name="badWordBhv" class="org.codelibs.fess.es.config.exbhv.BadWordBhv"/>
     <component name="boostDocumentRuleBhv" class="org.codelibs.fess.es.config.exbhv.BoostDocumentRuleBhv"/>
     <component name="boostDocumentRuleBhv" class="org.codelibs.fess.es.config.exbhv.BoostDocumentRuleBhv"/>
     <component name="crawlingInfoBhv" class="org.codelibs.fess.es.config.exbhv.CrawlingInfoBhv"/>
     <component name="crawlingInfoBhv" class="org.codelibs.fess.es.config.exbhv.CrawlingInfoBhv"/>
     <component name="crawlingInfoParamBhv" class="org.codelibs.fess.es.config.exbhv.CrawlingInfoParamBhv"/>
     <component name="crawlingInfoParamBhv" class="org.codelibs.fess.es.config.exbhv.CrawlingInfoParamBhv"/>
@@ -16,6 +17,8 @@
     <component name="dataConfigToRoleBhv" class="org.codelibs.fess.es.config.exbhv.DataConfigToRoleBhv"/>
     <component name="dataConfigToRoleBhv" class="org.codelibs.fess.es.config.exbhv.DataConfigToRoleBhv"/>
     <component name="dataConfigBhv" class="org.codelibs.fess.es.config.exbhv.DataConfigBhv"/>
     <component name="dataConfigBhv" class="org.codelibs.fess.es.config.exbhv.DataConfigBhv"/>
     <component name="duplicateHostBhv" class="org.codelibs.fess.es.config.exbhv.DuplicateHostBhv"/>
     <component name="duplicateHostBhv" class="org.codelibs.fess.es.config.exbhv.DuplicateHostBhv"/>
+    <component name="elevateWordToLabelBhv" class="org.codelibs.fess.es.config.exbhv.ElevateWordToLabelBhv"/>
+    <component name="elevateWordBhv" class="org.codelibs.fess.es.config.exbhv.ElevateWordBhv"/>
     <component name="failureUrlBhv" class="org.codelibs.fess.es.config.exbhv.FailureUrlBhv"/>
     <component name="failureUrlBhv" class="org.codelibs.fess.es.config.exbhv.FailureUrlBhv"/>
     <component name="fileAuthenticationBhv" class="org.codelibs.fess.es.config.exbhv.FileAuthenticationBhv"/>
     <component name="fileAuthenticationBhv" class="org.codelibs.fess.es.config.exbhv.FileAuthenticationBhv"/>
     <component name="fileConfigToLabelBhv" class="org.codelibs.fess.es.config.exbhv.FileConfigToLabelBhv"/>
     <component name="fileConfigToLabelBhv" class="org.codelibs.fess.es.config.exbhv.FileConfigToLabelBhv"/>
@@ -29,9 +32,7 @@
     <component name="requestHeaderBhv" class="org.codelibs.fess.es.config.exbhv.RequestHeaderBhv"/>
     <component name="requestHeaderBhv" class="org.codelibs.fess.es.config.exbhv.RequestHeaderBhv"/>
     <component name="roleTypeBhv" class="org.codelibs.fess.es.config.exbhv.RoleTypeBhv"/>
     <component name="roleTypeBhv" class="org.codelibs.fess.es.config.exbhv.RoleTypeBhv"/>
     <component name="scheduledJobBhv" class="org.codelibs.fess.es.config.exbhv.ScheduledJobBhv"/>
     <component name="scheduledJobBhv" class="org.codelibs.fess.es.config.exbhv.ScheduledJobBhv"/>
-    <component name="badWordBhv" class="org.codelibs.fess.es.config.exbhv.BadWordBhv"/>
-    <component name="elevateWordToLabelBhv" class="org.codelibs.fess.es.config.exbhv.ElevateWordToLabelBhv"/>
-    <component name="elevateWordBhv" class="org.codelibs.fess.es.config.exbhv.ElevateWordBhv"/>
+    <component name="thumbnailQueueBhv" class="org.codelibs.fess.es.config.exbhv.ThumbnailQueueBhv"/>
     <component name="webAuthenticationBhv" class="org.codelibs.fess.es.config.exbhv.WebAuthenticationBhv"/>
     <component name="webAuthenticationBhv" class="org.codelibs.fess.es.config.exbhv.WebAuthenticationBhv"/>
     <component name="webConfigToLabelBhv" class="org.codelibs.fess.es.config.exbhv.WebConfigToLabelBhv"/>
     <component name="webConfigToLabelBhv" class="org.codelibs.fess.es.config.exbhv.WebConfigToLabelBhv"/>
     <component name="webConfigToRoleBhv" class="org.codelibs.fess.es.config.exbhv.WebConfigToRoleBhv"/>
     <component name="webConfigToRoleBhv" class="org.codelibs.fess.es.config.exbhv.WebConfigToRoleBhv"/>

+ 1 - 0
src/main/resources/fess_config.properties

@@ -341,6 +341,7 @@ page.search.field.log.max.fetch.size=100
 page.elevate.word.max.fetch.size=1000
 page.elevate.word.max.fetch.size=1000
 page.bad.word.max.fetch.size=1000
 page.bad.word.max.fetch.size=1000
 page.dictionary.max.fetch.size=1000
 page.dictionary.max.fetch.size=1000
+page.thumbnail.queue.max.fetch.size=100
 
 
 # search page
 # search page
 paging.search.page.start=0
 paging.search.page.start=0

+ 5 - 0
src/main/resources/fess_indices/.fess_config/alias/.fess_basic_config.json

@@ -20,6 +20,11 @@
         "type": {
         "type": {
           "value": "job_log"
           "value": "job_log"
         }
         }
+      },
+      {
+        "type": {
+          "value": "thumbnail_queue"
+        }
       }
       }
     ]
     ]
   }
   }

+ 4 - 2
src/main/resources/fess_indices/.fess_config/scheduled_job.bulk

@@ -8,7 +8,9 @@
 {"name":"Log Purger","target":"all","cronExpression":"0 0 * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeLogJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":4,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
 {"name":"Log Purger","target":"all","cronExpression":"0 0 * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeLogJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":4,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"doc_purger"}}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"doc_purger"}}
 {"name":"Doc Purger","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeDocJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":5,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
 {"name":"Doc Purger","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeDocJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":5,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
+{"index":{"_index":".fess_config","_type":"scheduled_job","_id":"thumbnail_generate"}}
+{"name":"Thumbnail Generator","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"generateThumbnailJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":6,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"thumbnail_purger"}}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"thumbnail_purger"}}
-{"name":"Thumbnail Purger","target":"all","cronExpression":"0 0 * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeThumbnailJob\").expiry(30 * 24 * 60 * 60 * 1000).execute();","jobLogging":true,"crawler":false,"available":true,"sortOrder":6,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
+{"name":"Thumbnail Purger","target":"all","cronExpression":"0 0 * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"purgeThumbnailJob\").expiry(30 * 24 * 60 * 60 * 1000).execute();","jobLogging":true,"crawler":false,"available":true,"sortOrder":7,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"ping_es"}}
 {"index":{"_index":".fess_config","_type":"scheduled_job","_id":"ping_es"}}
-{"name":"Ping Elasticsearch","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"pingEsJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":7,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}
+{"name":"Ping Elasticsearch","target":"all","cronExpression":"* * * * *","scriptType":"groovy","scriptData":"return container.getComponent(\"pingEsJob\").execute();","jobLogging":false,"crawler":false,"available":true,"sortOrder":8,"createdBy":"system","createdTime":0,"updatedBy":"system","updatedTime":0}

+ 31 - 0
src/main/resources/fess_indices/.fess_config/thumbnail_queue.json

@@ -0,0 +1,31 @@
+{
+  "thumbnail_queue": {
+    "_source": {
+      "enabled": true
+    },
+    "_all": {
+      "enabled": false
+    },
+    "properties": {
+      "url": {
+        "type": "string",
+        "index": "not_analyzed"
+      },
+      "path": {
+        "type": "string",
+        "index": "not_analyzed"
+      },
+      "generator": {
+        "type": "string",
+        "index": "not_analyzed"
+      },
+      "createdTime": {
+        "type": "long"
+      },
+      "createdBy": {
+        "type": "string",
+        "index": "not_analyzed"
+      }
+    }
+  }
+}

+ 2 - 0
src/main/resources/fess_job.xml

@@ -16,6 +16,8 @@
 	</component>
 	</component>
 	<component name="purgeLogJob" class="org.codelibs.fess.job.PurgeLogJob" instance="prototype">
 	<component name="purgeLogJob" class="org.codelibs.fess.job.PurgeLogJob" instance="prototype">
 	</component>
 	</component>
+	<component name="generateThumbnailJob" class="org.codelibs.fess.job.GenerateThumbnailJob" instance="prototype">
+	</component>
 	<component name="purgeThumbnailJob" class="org.codelibs.fess.job.PurgeThumbnailJob" instance="prototype">
 	<component name="purgeThumbnailJob" class="org.codelibs.fess.job.PurgeThumbnailJob" instance="prototype">
 	</component>
 	</component>
 	<component name="pingEsJob" class="org.codelibs.fess.job.PingEsJob" instance="prototype">
 	<component name="pingEsJob" class="org.codelibs.fess.job.PingEsJob" instance="prototype">

+ 3 - 0
src/main/resources/fess_thumbnail.xml

@@ -11,6 +11,7 @@
 		</postConstruct>
 		</postConstruct>
 	</component>
 	</component>
 	<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.WebDriverGenerator">
 	<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.WebDriverGenerator">
+		<property name="name">"htmlThumbnailGenerator"</property>
 		<property name="generatorList">
 		<property name="generatorList">
 			["${path}/phantomjs"]
 			["${path}/phantomjs"]
 		</property>
 		</property>
@@ -29,6 +30,7 @@
 	</component>
 	</component>
 <!--
 <!--
 	<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
 	<component name="htmlThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
+		<property name="name">"htmlThumbnailGenerator"</property>
 		<property name="commandList">
 		<property name="commandList">
 			["${path}/generate-thumbnail",
 			["${path}/generate-thumbnail",
 			"html",
 			"html",
@@ -45,6 +47,7 @@
 	</component>
 	</component>
 -->
 -->
 	<component name="msofficeThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
 	<component name="msofficeThumbnailGenerator" class="org.codelibs.fess.thumbnail.impl.CommandGenerator">
+		<property name="name">"msofficeThumbnailGenerator"</property>
 		<property name="commandList">
 		<property name="commandList">
 			["${path}/generate-thumbnail",
 			["${path}/generate-thumbnail",
 			"msoffice",
 			"msoffice",