diff --git a/src/main/java/org/codelibs/fess/entity/SearchRequestParams.java b/src/main/java/org/codelibs/fess/entity/SearchRequestParams.java index cefb96aaa..efd323f9b 100644 --- a/src/main/java/org/codelibs/fess/entity/SearchRequestParams.java +++ b/src/main/java/org/codelibs/fess/entity/SearchRequestParams.java @@ -40,6 +40,8 @@ public interface SearchRequestParams { String AS_OCCURRENCE = "occt"; + String AS_TIMESTAMP = "timestamp"; + String getQuery(); Map getFields(); @@ -74,6 +76,7 @@ public interface SearchRequestParams { || !isEmptyArray(conditions.get(AS_EPQ))// || !isEmptyArray(conditions.get(AS_OQ))// || !isEmptyArray(conditions.get(AS_NQ))// + || !isEmptyArray(conditions.get(AS_TIMESTAMP))// || !isEmptyArray(conditions.get(AS_SITESEARCH))// || !isEmptyArray(conditions.get(AS_FILETYPE)); } diff --git a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java index 972f260f1..6c866a574 100644 --- a/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java +++ b/src/main/java/org/codelibs/fess/mylasta/action/FessLabels.java @@ -2733,6 +2733,24 @@ public class FessLabels extends UserMessages { /** The key of the message: Site or domain */ public static final String LABELS_advance_search_sitesearch = "{labels.advance_search_sitesearch}"; + /** The key of the message: Last update */ + public static final String LABELS_advance_search_timestamp = "{labels.advance_search_timestamp}"; + + /** The key of the message: anytime */ + public static final String LABELS_advance_search_timestamp_default = "{labels.advance_search_timestamp_default}"; + + /** The key of the message: past 24 hours */ + public static final String LABELS_advance_search_timestamp_pastday = "{labels.advance_search_timestamp_pastday}"; + + /** The key of the message: past week */ + public static final String LABELS_advance_search_timestamp_pastweek = "{labels.advance_search_timestamp_pastweek}"; + + /** The key of the message: past month */ + public static final String LABELS_advance_search_timestamp_pastmonth = "{labels.advance_search_timestamp_pastmonth}"; + + /** The key of the message: past year */ + public static final String LABELS_advance_search_timestamp_pastyear = "{labels.advance_search_timestamp_pastyear}"; + /** * Assert the property is not null. * @param property The value of the property. (NotNull) diff --git a/src/main/java/org/codelibs/fess/util/QueryStringBuilder.java b/src/main/java/org/codelibs/fess/util/QueryStringBuilder.java index 128bc0f7a..c5666bac4 100644 --- a/src/main/java/org/codelibs/fess/util/QueryStringBuilder.java +++ b/src/main/java/org/codelibs/fess/util/QueryStringBuilder.java @@ -133,6 +133,9 @@ public class QueryStringBuilder { stream(conditions.get(SearchRequestParams.AS_SITESEARCH)).of( stream -> stream.filter(q -> StringUtil.isNotBlank(q) && q.length() <= maxQueryLength).forEach( q -> queryBuf.append(" site:").append(q.trim()))); + stream(conditions.get(SearchRequestParams.AS_TIMESTAMP)).of( + stream -> stream.filter(q -> StringUtil.isNotBlank(q) && q.length() <= maxQueryLength).forEach( + q -> queryBuf.append(" timestamp:").append(q.trim()))); } protected boolean isOccurrence(final String value) { diff --git a/src/main/resources/fess_label.properties b/src/main/resources/fess_label.properties index a3035c703..95ff0d319 100644 --- a/src/main/resources/fess_label.properties +++ b/src/main/resources/fess_label.properties @@ -901,3 +901,9 @@ labels.advance_search_occt_default=anywhere in the page labels.advance_search_occt_allintitle=in the title of the page labels.advance_search_occt_allinurl=in the url of the page labels.advance_search_sitesearch=Site or domain +labels.advance_search_timestamp=Last update +labels.advance_search_timestamp_default=anytime +labels.advance_search_timestamp_pastday=past 24 hours +labels.advance_search_timestamp_pastweek=past week +labels.advance_search_timestamp_pastmonth=past month +labels.advance_search_timestamp_pastyear=past year diff --git a/src/main/resources/fess_label_en.properties b/src/main/resources/fess_label_en.properties index dd7f04703..22c7c73d2 100644 --- a/src/main/resources/fess_label_en.properties +++ b/src/main/resources/fess_label_en.properties @@ -901,3 +901,9 @@ labels.advance_search_occt_default=anywhere in the page labels.advance_search_occt_allintitle=in the title of the page labels.advance_search_occt_allinurl=in the url of the page labels.advance_search_sitesearch=Site or domain +labels.advance_search_timestamp=Last update +labels.advance_search_timestamp_default=anytime +labels.advance_search_timestamp_pastday=past 24 hours +labels.advance_search_timestamp_pastweek=past week +labels.advance_search_timestamp_pastmonth=past month +labels.advance_search_timestamp_pastyear=past year diff --git a/src/main/resources/fess_label_ja.properties b/src/main/resources/fess_label_ja.properties index ba889fde6..8c46cf24c 100644 --- a/src/main/resources/fess_label_ja.properties +++ b/src/main/resources/fess_label_ja.properties @@ -903,3 +903,9 @@ labels.advance_search_occt_default=\u30da\u30fc\u30b8\u5168\u4f53 labels.advance_search_occt_allintitle=\u30da\u30fc\u30b8\u5185\u306e\u30bf\u30a4\u30c8\u30eb labels.advance_search_occt_allinurl=\u30da\u30fc\u30b8\u5185\u306eURL labels.advance_search_sitesearch=\u30b5\u30a4\u30c8\u307e\u305f\u306f\u30c9\u30e1\u30a4\u30f3 +labels.advance_search_timestamp=\u66f4\u65b0\u65e5\u6642 +labels.advance_search_timestamp_default=\u6307\u5b9a\u306a\u3057 +labels.advance_search_timestamp_pastday=24\u6642\u9593\u4ee5\u5185 +labels.advance_search_timestamp_pastweek=1\u9031\u9593\u4ee5\u5185 +labels.advance_search_timestamp_pastmonth=1\u30f6\u6708\u4ee5\u5185 +labels.advance_search_timestamp_pastyear=1\u5e74\u4ee5\u5185 diff --git a/src/main/webapp/WEB-INF/view/advance.jsp b/src/main/webapp/WEB-INF/view/advance.jsp index 830dc5117..12f03d58f 100644 --- a/src/main/webapp/WEB-INF/view/advance.jsp +++ b/src/main/webapp/WEB-INF/view/advance.jsp @@ -19,51 +19,53 @@ ${fe:facetForm()}${fe:geoForm()} -
+

@@ -233,6 +235,31 @@

+
+ +
+ +
+
+ +
+
-