fix #650 add index.document.suggest.index

This commit is contained in:
Shinsuke Sugaya 2016-08-26 06:10:35 +09:00
parent 0e7d37bbbc
commit 824d60f0b2
3 changed files with 16 additions and 1 deletions

View file

@ -86,7 +86,7 @@ public class SuggestHelper {
fessEsClient.admin().cluster().prepareHealth().setWaitForYellowStatus().execute().actionGet(fessConfig.getIndexHealthTimeout());
suggester = Suggester.builder().build(fessEsClient, fessConfig.getIndexDocumentSearchIndex());
suggester = Suggester.builder().build(fessEsClient, fessConfig.getIndexDocumentSuggestIndex());
suggester.settings().array().delete(SuggestSettings.DefaultKeys.SUPPORTED_FIELDS);
split(fessConfig.getSuggestFieldIndexContents(), ",").of(
stream -> stream.filter(StringUtil::isNotBlank).forEach(

View file

@ -357,6 +357,9 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
/** The key of the configuration. e.g. doc */
String INDEX_DOCUMENT_TYPE = "index.document.type";
/** The key of the configuration. e.g. fess */
String INDEX_DOCUMENT_SUGGEST_INDEX = "index.document.suggest.index";
/** The key of the configuration. e.g. lang,role,label,anchor */
String INDEX_ADMIN_ARRAY_FIELDS = "index.admin.array.fields";
@ -2026,6 +2029,13 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
*/
String getIndexDocumentType();
/**
* Get the value for the key 'index.document.suggest.index'. <br>
* The value is, e.g. fess <br>
* @return The value of found property. (NotNull: if not found, exception but basically no way)
*/
String getIndexDocumentSuggestIndex();
/**
* Get the value for the key 'index.admin.array.fields'. <br>
* The value is, e.g. lang,role,label,anchor <br>
@ -4662,6 +4672,10 @@ public interface FessConfig extends FessEnv, org.codelibs.fess.mylasta.direction
return get(FessConfig.INDEX_DOCUMENT_TYPE);
}
public String getIndexDocumentSuggestIndex() {
return get(FessConfig.INDEX_DOCUMENT_SUGGEST_INDEX);
}
public String getIndexAdminArrayFields() {
return get(FessConfig.INDEX_ADMIN_ARRAY_FIELDS);
}

View file

@ -171,6 +171,7 @@ response.field.site_path=site_path
index.document.search.index=fess.search
index.document.update.index=fess.update
index.document.type=doc
index.document.suggest.index=fess
# doc management
index.admin.array.fields=lang,role,label,anchor