Merge branch 'master' into 10.3.x

This commit is contained in:
Shinsuke Sugaya 2016-09-29 18:27:01 +09:00
commit 0fad048005
13 changed files with 130 additions and 2 deletions

View file

@ -58,6 +58,7 @@ import org.elasticsearch.action.admin.indices.close.CloseIndexRequest;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsResponse;
import org.elasticsearch.action.admin.indices.mapping.get.GetFieldMappingsResponse;
import org.elasticsearch.action.admin.indices.mapping.get.GetFieldMappingsResponse.FieldMappingMetaData;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
import org.elasticsearch.action.admin.indices.open.OpenIndexRequest;
import org.elasticsearch.action.index.IndexRequest;
@ -217,7 +218,17 @@ public class AdminUpgradeAction extends FessAdminAction {
}
private void upgradeFrom10_2() {
// TODO
final IndicesAdminClient indicesClient = fessEsClient.admin().indices();
final String configIndex = ".fess_config";
final String updateIndex = fessConfig.getIndexDocumentUpdateIndex();
final String searchIndex = fessConfig.getIndexDocumentSearchIndex();
// update mapping
addFieldMapping(indicesClient, updateIndex, "doc", "filename",
"{\"properties\":{\"filename\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}");
addFieldMapping(indicesClient, searchIndex, "doc", "filename",
"{\"properties\":{\"filename\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}");
addFieldMapping(indicesClient, configIndex, "job_log", "lastUpdated", "{\"properties\":{\"lastUpdated\":{\"type\":\"long\"}}}");
}
private void upgradeFrom10_1() {
@ -1023,7 +1034,8 @@ public class AdminUpgradeAction extends FessAdminAction {
final String source) {
final GetFieldMappingsResponse gfmResponse =
indicesClient.prepareGetFieldMappings(index).addTypes(type).setFields(field).execute().actionGet();
if (gfmResponse.fieldMappings(index, type, field).isNull()) {
final FieldMappingMetaData fieldMappings = gfmResponse.fieldMappings(index, type, field);
if (fieldMappings == null || fieldMappings.isNull()) {
try {
final PutMappingResponse pmResponse =
indicesClient.preparePutMapping(index).setType(type).setSource(source).execute().actionGet();

View file

@ -602,6 +602,12 @@ public class FessLabels extends UserMessages {
/** The key of the message: Score */
public static final String LABELS_search_result_sort_score_desc = "{labels.search_result_sort_score_desc}";
/** The key of the message: File Name (ascending) */
public static final String LABELS_search_result_sort_filename_asc = "{labels.search_result_sort_filename_asc}";
/** The key of the message: File Name (descending) */
public static final String LABELS_search_result_sort_filename_desc = "{labels.search_result_sort_filename_desc}";
/** The key of the message: Date (ascending) */
public static final String LABELS_search_result_sort_created_asc = "{labels.search_result_sort_created_asc}";
@ -740,6 +746,21 @@ public class FessLabels extends UserMessages {
/** The key of the message: Compiled HTML Help */
public static final String LABELS_facet_filetype_chm = "{labels.facet_filetype_chm}";
/** The key of the message: ZIP Archive */
public static final String LABELS_facet_filetype_zip = "{labels.facet_filetype_zip}";
/** The key of the message: 7z Archive */
public static final String LABELS_facet_filetype_7z = "{labels.facet_filetype_7z}";
/** The key of the message: Bz Archive */
public static final String LABELS_facet_filetype_bz = "{labels.facet_filetype_bz}";
/** The key of the message: Bz2 Archive */
public static final String LABELS_facet_filetype_bz2 = "{labels.facet_filetype_bz2}";
/** The key of the message: TAR Archive */
public static final String LABELS_facet_filetype_tar = "{labels.facet_filetype_tar}";
/** The key of the message: Others */
public static final String LABELS_facet_filetype_others = "{labels.facet_filetype_others}";

View file

@ -63,6 +63,11 @@
"filetype:txt",
"filetype:rtf",
"filetype:chm",
"filetype:zip",
"filetype:7z",
"filetype:bz",
"filetype:bz2",
"filetype:tar",
"filetype:others"
]</property>
</component>
@ -185,6 +190,26 @@
<arg>"labels.facet_filetype_chm"</arg>
<arg>"filetype:chm"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_zip"</arg>
<arg>"filetype:zip"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_7z"</arg>
<arg>"filetype:7z"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_bz"</arg>
<arg>"filetype:bz"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_bz2"</arg>
<arg>"filetype:bz2"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_tar"</arg>
<arg>"filetype:tar"</arg>
</postConstruct>
<postConstruct name="addQuery">
<arg>"labels.facet_filetype_others"</arg>
<arg>"filetype:others"</arg>

View file

@ -191,6 +191,8 @@ labels.search_popular_word_word=Popular Words:
labels.search_result_select_sort=-- Sort --
labels.search_result_select_num=-- Results per page --
labels.search_result_sort_score_desc=Score
labels.search_result_sort_filename_asc=File Name (ascending)
labels.search_result_sort_filename_desc=File Name (descending)
labels.search_result_sort_created_asc=Date (ascending)
labels.search_result_sort_created_desc=Date (descending)
labels.search_result_sort_content_length_asc=Size (ascending)
@ -237,6 +239,11 @@ labels.facet_filetype_ibooks=iBooks
labels.facet_filetype_txt=Plain Text
labels.facet_filetype_rtf=Rich Text Format
labels.facet_filetype_chm=Compiled HTML Help
labels.facet_filetype_zip=ZIP Archive
labels.facet_filetype_7z=7z Archive
labels.facet_filetype_bz=Bz Archive
labels.facet_filetype_bz2=Bz2 Archive
labels.facet_filetype_tar=TAR Archive
labels.facet_filetype_others=Others
labels.facet_label_reset=Reset
labels.searchoptions_all=All

View file

@ -191,6 +191,8 @@ labels.search_popular_word_word=Popular Words:
labels.search_result_select_sort=-- Sort --
labels.search_result_select_num=-- Results per page --
labels.search_result_sort_score_desc=Score
labels.search_result_sort_filename_asc=File Name (ascending)
labels.search_result_sort_filename_desc=File Name (descending)
labels.search_result_sort_created_asc=Date (ascending)
labels.search_result_sort_created_desc=Date (descending)
labels.search_result_sort_content_length_asc=Size (ascending)
@ -237,6 +239,11 @@ labels.facet_filetype_ibooks=iBooks
labels.facet_filetype_txt=Plain Text
labels.facet_filetype_rtf=Rich Text Format
labels.facet_filetype_chm=Compiled HTML Help
labels.facet_filetype_zip=ZIP Archive
labels.facet_filetype_7z=7z Archive
labels.facet_filetype_bz=Bz Archive
labels.facet_filetype_bz2=Bz2 Archive
labels.facet_filetype_tar=TAR Archive
labels.facet_filetype_others=Others
labels.facet_label_reset=Reset
labels.searchoptions_all=All

View file

@ -187,6 +187,8 @@ labels.search_popular_word_word=\u4eba\u6c17\u30ef\u30fc\u30c9:
labels.search_result_select_sort=- \u30bd\u30fc\u30c8 -
labels.search_result_select_num=- \u8868\u793a\u4ef6\u6570 -
labels.search_result_sort_score_desc=\u30b9\u30b3\u30a2\u9806
labels.search_result_sort_filename_asc=\u30d5\u30a1\u30a4\u30eb\u540d (\u6607\u9806)
labels.search_result_sort_filename_desc=\u30d5\u30a1\u30a4\u30eb\u540d (\u964d\u9806)
labels.search_result_sort_created_asc=\u65e5\u4ed8 (\u6607\u9806)
labels.search_result_sort_created_desc=\u65e5\u4ed8 (\u964d\u9806)
labels.search_result_sort_content_length_asc=\u30b5\u30a4\u30ba (\u6607\u9806)
@ -233,6 +235,11 @@ labels.facet_filetype_ibooks=iBooks
labels.facet_filetype_txt=\u30c6\u30ad\u30b9\u30c8
labels.facet_filetype_rtf=\u30ea\u30c3\u30c1\u30c6\u30ad\u30b9\u30c8
labels.facet_filetype_chm=Compiled HTML Help
labels.facet_filetype_zip=ZIP\u30a2\u30fc\u30ab\u30a4\u30d6
labels.facet_filetype_7z=7z\u30a2\u30fc\u30ab\u30a4\u30d6
labels.facet_filetype_bz=Bz\u30a2\u30fc\u30ab\u30a4\u30d6
labels.facet_filetype_bz2=Bz2\u30a2\u30fc\u30ab\u30a4\u30d6
labels.facet_filetype_tar=TAR\u30a2\u30fc\u30ab\u30a4\u30d6
labels.facet_filetype_others=\u305d\u306e\u4ed6
labels.facet_label_reset=\u30ea\u30bb\u30c3\u30c8
labels.searchoptions_all=\u3059\u3079\u3066

View file

@ -184,6 +184,8 @@ labels.search_popular_word_word = \uc778\uae30 \uac80\uc0c9\uc5b4 :
labels.search_result_select_sort = - \uc815\ub82c -
labels.search_result_select_num = - \ud45c\uc2dc \uac74\uc218 -
labels.search_result_sort_score_desc = \uc810\uc218 \uc21c
labels.search_result_sort_filename_asc=File Name (ascending)
labels.search_result_sort_filename_desc=File Name (descending)
labels.search_result_sort_created_asc = \ub0a0\uc9dc (\uc624\ub984\ucc28\uc21c)
labels.search_result_sort_created_desc = \ub0a0\uc9dc (\ub0b4\ub9bc\ucc28\uc21c)
labels.search_result_sort_content_length_asc = \ud06c\uae30 (\uc624\ub984\ucc28\uc21c)
@ -229,6 +231,11 @@ labels.facet_filetype_ibooks=iBooks
labels.facet_filetype_txt=Plain Text
labels.facet_filetype_rtf=Rich Text Format
labels.facet_filetype_chm=Compiled HTML Help
labels.facet_filetype_zip=ZIP Archive
labels.facet_filetype_7z=7z Archive
labels.facet_filetype_bz=Bz Archive
labels.facet_filetype_bz2=Bz2 Archive
labels.facet_filetype_tar=TAR Archive
labels.facet_filetype_others = \uae30\ud0c0
labels.facet_label_reset = \uc7ac\uc124\uc815
labels.searchoptions_all = \ubaa8\ub4e0

View file

@ -237,6 +237,11 @@ labels.facet_filetype_ibooks=iBooks
labels.facet_filetype_txt=Plain Text
labels.facet_filetype_rtf=Rich Text Format
labels.facet_filetype_chm=Compiled HTML Help
labels.facet_filetype_zip=ZIP Архив
labels.facet_filetype_7z=7z Архив
labels.facet_filetype_bz=Bz Архив
labels.facet_filetype_bz2=Bz2 Архив
labels.facet_filetype_tar=TAR Архив
labels.facet_filetype_others=Другие
labels.facet_label_reset=Сброс
labels.searchoptions_all=Все

View file

@ -117,6 +117,26 @@
<arg>"application/vnd.ms-htmlhelp"</arg>
<arg>"chm"</arg>
</postConstruct>
<postConstruct name="add">
<arg>"application/zip"</arg>
<arg>"zip"</arg>
</postConstruct>
<postConstruct name="add">
<arg>"application/x-7z-comressed"</arg>
<arg>"7z"</arg>
</postConstruct>
<postConstruct name="add">
<arg>"application/x-bzip"</arg>
<arg>"bz"</arg>
</postConstruct>
<postConstruct name="add">
<arg>"application/x-bzip2"</arg>
<arg>"bz2"</arg>
</postConstruct>
<postConstruct name="add">
<arg>"application/x-tar"</arg>
<arg>"tar"</arg>
</postConstruct>
</component>
<component name="fessCrawler" class="org.codelibs.fess.exec.Crawler"
instance="prototype">

View file

@ -44,6 +44,7 @@
<div class="col-sm-9">
<la:errors property="targetVersion" />
<la:select property="targetVersion" styleClass="form-control">
<la:option value="10.2">10.2</la:option>
<la:option value="10.1">10.1</la:option>
<la:option value="10.0">10.0</la:option>
</la:select>

View file

@ -103,6 +103,12 @@ ${fe:facetForm()}${fe:geoForm()}
<la:option value="score.desc">
<la:message key="labels.search_result_sort_score_desc" />
</la:option>
<la:option value="filename.asc">
<la:message key="labels.search_result_sort_filename_asc" />
</la:option>
<la:option value="filename.desc">
<la:message key="labels.search_result_sort_filename_desc" />
</la:option>
<la:option value="created.asc">
<la:message key="labels.search_result_sort_created_asc" />
</la:option>

View file

@ -163,6 +163,12 @@
<la:option value="score.desc">
<la:message key="labels.search_result_sort_score_desc" />
</la:option>
<la:option value="filename.asc">
<la:message key="labels.search_result_sort_filename_asc" />
</la:option>
<la:option value="filename.desc">
<la:message key="labels.search_result_sort_filename_desc" />
</la:option>
<la:option value="created.asc">
<la:message key="labels.search_result_sort_created_asc" />
</la:option>

View file

@ -30,6 +30,10 @@
<la:message key="labels.searchoptions_score" />
</c:if> <c:if test="${sort=='score.desc'}">
<la:message key="labels.searchoptions_score" />
</c:if> <c:if test="${sort=='filename.asc'}">
<la:message key="labels.search_result_sort_filename_asc" />
</c:if> <c:if test="${sort=='filename.desc'}">
<la:message key="labels.search_result_sort_filename_desc" />
</c:if> <c:if test="${sort=='created.asc'}">
<la:message key="labels.search_result_sort_created_asc" />
</c:if> <c:if test="${sort=='created.desc'}">