fix #1576 add suggest.update.contents.limit.doc.size
This commit is contained in:
parent
b2b037d066
commit
adf34e3d83
3 changed files with 29 additions and 0 deletions
|
@ -199,6 +199,7 @@ public class SuggestHelper {
|
|||
reader.setScrollSize(fessConfig.getSuggestSourceReaderScrollSizeAsInteger());
|
||||
reader.setLimitDocNumPercentage(fessConfig.getSuggestUpdateContentsLimitNumPercentage());
|
||||
reader.setLimitNumber(fessConfig.getSuggestUpdateContentsLimitNumAsInteger());
|
||||
reader.setLimitOfDocumentSize(fessConfig.getSuggestUpdateContentsLimitDocSizeAsInteger());
|
||||
|
||||
final List<FunctionScoreQueryBuilder.FilterFunctionBuilder> flist = new ArrayList<>();
|
||||
flist.add(new FunctionScoreQueryBuilder.FilterFunctionBuilder(ScoreFunctionBuilders.randomFunction()
|
||||
|
|
|
@ -1123,6 +1123,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
/** The key of the configuration. e.g. 10000 */
|
||||
String SUGGEST_UPDATE_CONTENTS_LIMIT_NUM = "suggest.update.contents.limit.num";
|
||||
|
||||
/** The key of the configuration. e.g. 50000 */
|
||||
String SUGGEST_UPDATE_CONTENTS_LIMIT_DOC_SIZE = "suggest.update.contents.limit.doc.size";
|
||||
|
||||
/** The key of the configuration. e.g. 1 */
|
||||
String SUGGEST_SOURCE_READER_SCROLL_SIZE = "suggest.source.reader.scroll.size";
|
||||
|
||||
|
@ -4970,6 +4973,21 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
*/
|
||||
Integer getSuggestUpdateContentsLimitNumAsInteger();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'suggest.update.contents.limit.doc.size'. <br>
|
||||
* The value is, e.g. 50000 <br>
|
||||
* @return The value of found property. (NotNull: if not found, exception but basically no way)
|
||||
*/
|
||||
String getSuggestUpdateContentsLimitDocSize();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'suggest.update.contents.limit.doc.size' as {@link Integer}. <br>
|
||||
* The value is, e.g. 50000 <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 getSuggestUpdateContentsLimitDocSizeAsInteger();
|
||||
|
||||
/**
|
||||
* Get the value for the key 'suggest.source.reader.scroll.size'. <br>
|
||||
* The value is, e.g. 1 <br>
|
||||
|
@ -7527,6 +7545,14 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
return getAsInteger(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_NUM);
|
||||
}
|
||||
|
||||
public String getSuggestUpdateContentsLimitDocSize() {
|
||||
return get(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_DOC_SIZE);
|
||||
}
|
||||
|
||||
public Integer getSuggestUpdateContentsLimitDocSizeAsInteger() {
|
||||
return getAsInteger(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_DOC_SIZE);
|
||||
}
|
||||
|
||||
public String getSuggestSourceReaderScrollSize() {
|
||||
return get(FessConfig.SUGGEST_SOURCE_READER_SCROLL_SIZE);
|
||||
}
|
||||
|
@ -8242,6 +8268,7 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
|
|||
defaultMap.put(FessConfig.SUGGEST_UPDATE_REQUEST_INTERVAL, "1");
|
||||
defaultMap.put(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_NUM_PERCENTAGE, "50%");
|
||||
defaultMap.put(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_NUM, "10000");
|
||||
defaultMap.put(FessConfig.SUGGEST_UPDATE_CONTENTS_LIMIT_DOC_SIZE, "50000");
|
||||
defaultMap.put(FessConfig.SUGGEST_SOURCE_READER_SCROLL_SIZE, "1");
|
||||
defaultMap.put(FessConfig.SUGGEST_POPULAR_WORD_CACHE_SIZE, "1000");
|
||||
defaultMap.put(FessConfig.SUGGEST_POPULAR_WORD_CACHE_EXPIRE, "60");
|
||||
|
|
|
@ -572,6 +572,7 @@ suggest.field.index.contents=content,title
|
|||
suggest.update.request.interval=1
|
||||
suggest.update.contents.limit.num.percentage=50%
|
||||
suggest.update.contents.limit.num=10000
|
||||
suggest.update.contents.limit.doc.size=50000
|
||||
suggest.source.reader.scroll.size=1
|
||||
suggest.popular.word.cache.size=1000
|
||||
suggest.popular.word.cache.expire=60
|
||||
|
|
Loading…
Add table
Reference in a new issue