diff --git a/plugin.xml b/plugin.xml
index 01d989ad1a..7e05a5df42 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -44,8 +44,8 @@
-
-
+
+
diff --git a/pom.xml b/pom.xml
index 070f6a1f47..76a415cf0e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.codelibs.fess
fess
- 12.1.2-SNAPSHOT
+ 12.1.3-SNAPSHOT
war
Fess
Fess is Full tExt Search System.
@@ -60,13 +60,13 @@
0.8.5
- 2.1.1
+ 2.1.2
- 6.2.1
+ 6.2.2
- 6.2.3
+ 6.2.4
6.0.0
${elasticsearch.version}.0
diff --git a/src/main/assemblies/files/fess.in.bat b/src/main/assemblies/files/fess.in.bat
index b2b80f5733..dba2469197 100644
--- a/src/main/assemblies/files/fess.in.bat
+++ b/src/main/assemblies/files/fess.in.bat
@@ -65,6 +65,10 @@ set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.shutdownHookEnabled=false
set JAVA_OPTS=%JAVA_OPTS% -Dlog4j2.disable.jmx=true
set JAVA_OPTS=%JAVA_OPTS% -Dlog4j.skipJansi=true
+REM SSL truststore for certificate validation over https
+REM JAVA_OPTS=%JAVA_OPTS% -Djavax.net.ssl.trustStore=/tech/elastic/config/truststore.jks
+REM JAVA_OPTS=%JAVA_OPTS% -Djavax.net.ssl.trustStorePassword=changeit
+
if NOT "%FESS_USE_GC_LOGGING%" == "" set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails
if NOT "%FESS_USE_GC_LOGGING%" == "" set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps
if NOT "%FESS_USE_GC_LOGGING%" == "" set JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDateStamps
diff --git a/src/main/assemblies/files/fess.in.sh b/src/main/assemblies/files/fess.in.sh
index dfba45fdf0..b206bd7b9d 100755
--- a/src/main/assemblies/files/fess.in.sh
+++ b/src/main/assemblies/files/fess.in.sh
@@ -18,6 +18,10 @@ fi
#ES_TRANSPORT_URL=localhost:9300
#FESS_DICTIONARY_PATH=/var/lib/elasticsearch/config/
+# SSL truststore for certificate validation over https
+#JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=/tech/elastic/config/truststore.jks"
+#JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStorePassword=changeit"
+
# min and max heap sizes should be set to the same value to avoid
# stop-the-world GC pauses during resize, and so that we can lock the
# heap in memory on startup to prevent any of it from being swapped
diff --git a/src/main/java/org/codelibs/fess/Constants.java b/src/main/java/org/codelibs/fess/Constants.java
index ddb91b8726..a0b7b33b14 100644
--- a/src/main/java/org/codelibs/fess/Constants.java
+++ b/src/main/java/org/codelibs/fess/Constants.java
@@ -35,6 +35,8 @@ public class Constants extends CoreLibConstants {
public static final Boolean F = false;
+ public static final String SCORE = "score";
+
public static final String ON = "on";
public static final String READY = "ready";
diff --git a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java
index 064d8e264c..3ee007b860 100644
--- a/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java
+++ b/src/main/java/org/codelibs/fess/api/json/JsonApiManager.java
@@ -138,34 +138,32 @@ protected void processScrollSearchRequest(final HttpServletRequest request, fina
final JsonRequestParams params = new JsonRequestParams(request, fessConfig);
try {
response.setContentType("application/x-ndjson; charset=UTF-8");
- final long count =
- searchService.scrollSearch(params, doc -> {
- buf.setLength(0);
- buf.append('{');
- boolean first2 = true;
- for (final Map.Entry entry : doc.entrySet()) {
- final String name = entry.getKey();
- if (StringUtil.isNotBlank(name) && entry.getValue() != null
- && ComponentUtil.getQueryHelper().isApiResponseField(name)) {
- if (!first2) {
- buf.append(',');
- } else {
- first2 = false;
- }
- buf.append(escapeJson(name));
- buf.append(':');
- buf.append(escapeJson(entry.getValue()));
- }
- }
- buf.append('}');
- buf.append('\n');
- try {
- response.getWriter().print(buf.toString());
- } catch (final IOException e) {
- throw new IORuntimeException(e);
+ final long count = searchService.scrollSearch(params, doc -> {
+ buf.setLength(0);
+ buf.append('{');
+ boolean first2 = true;
+ for (final Map.Entry entry : doc.entrySet()) {
+ final String name = entry.getKey();
+ if (StringUtil.isNotBlank(name) && entry.getValue() != null) {
+ if (!first2) {
+ buf.append(',');
+ } else {
+ first2 = false;
}
- return true;
- }, OptionalThing.empty());
+ buf.append(escapeJson(name));
+ buf.append(':');
+ buf.append(escapeJson(entry.getValue()));
+ }
+ }
+ buf.append('}');
+ buf.append('\n');
+ try {
+ response.getWriter().print(buf.toString());
+ } catch (final IOException e) {
+ throw new IORuntimeException(e);
+ }
+ return true;
+ }, OptionalThing.empty());
response.flushBuffer();
if (logger.isDebugEnabled()) {
logger.debug("Loaded " + count + " docs");
diff --git a/src/main/java/org/codelibs/fess/app/service/SearchService.java b/src/main/java/org/codelibs/fess/app/service/SearchService.java
index ceba1a16ee..87c7e1b079 100644
--- a/src/main/java/org/codelibs/fess/app/service/SearchService.java
+++ b/src/main/java/org/codelibs/fess/app/service/SearchService.java
@@ -16,7 +16,6 @@
package org.codelibs.fess.app.service;
import java.text.NumberFormat;
-import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
@@ -43,6 +42,7 @@
import org.codelibs.fess.es.client.FessEsClientException;
import org.codelibs.fess.helper.QueryHelper;
import org.codelibs.fess.helper.SystemHelper;
+import org.codelibs.fess.helper.ViewHelper;
import org.codelibs.fess.mylasta.action.FessUserBean;
import org.codelibs.fess.mylasta.direction.FessConfig;
import org.codelibs.fess.util.ComponentUtil;
@@ -107,7 +107,7 @@ public void search(final SearchRequestParams params, final SearchRenderData data
fessConfig.getIndexDocumentSearchIndex(),
fessConfig.getIndexDocumentType(),
searchRequestBuilder -> {
- fessConfig.processSearchPreference(searchRequestBuilder, userBean);
+ queryHelper.processSearchPreference(searchRequestBuilder, userBean);
return SearchConditionBuilder.builder(searchRequestBuilder)
.query(StringUtil.isBlank(sortField) ? query : query + " sort:" + sortField).offset(pageStart)
.size(pageSize).facetInfo(params.getFacetInfo()).geoInfo(params.getGeoInfo())
@@ -192,29 +192,38 @@ public long scrollSearch(final SearchRequestParams params, final Function