From e25f2ee88b6ecbaca7230e722b29154647a85dd8 Mon Sep 17 00:00:00 2001 From: reger Date: Sun, 2 Oct 2016 06:36:34 +0200 Subject: [PATCH] mention date search parameter in search option help (index.html) --- htroot/index.html | 6 ++++++ htroot/index.java | 7 +++++-- locales/master.lng.xlf | 6 ++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/htroot/index.html b/htroot/index.html index d79c6cd14..f1016186b 100644 --- a/htroot/index.html +++ b/htroot/index.html @@ -149,6 +149,12 @@
only pages with as-author-anotated <author>
tld:<tld>
only pages from top-level-domains <tld>
+ #(datesincontent)#:: +
on:<date>
+
only pages with <date> in content
+
from:<date1> to:<date2>
+
only pages with a date between <date1> and <date2> in content
+ #(/datesincontent)#
/http
only resources from http or https servers
/ftp
diff --git a/htroot/index.java b/htroot/index.java index 18648cd95..3a03e8a52 100644 --- a/htroot/index.java +++ b/htroot/index.java @@ -33,6 +33,7 @@ import net.yacy.cora.document.analysis.Classification.ContentDomain; import net.yacy.cora.protocol.RequestHeader; import net.yacy.search.Switchboard; import net.yacy.search.SwitchboardConstants; +import net.yacy.search.schema.CollectionSchema; import net.yacy.server.serverObjects; import net.yacy.server.serverSwitch; @@ -65,9 +66,11 @@ public class index { int searchoptions = (post == null) ? 0 : Math.min(1, post.getInt("searchoptions", 0)); if (!sb.getConfigBool("search.options", true)) { searchoptions = 0; - } else { // show heuristic hint on search option screen - // (only if heuristic is ON by config) + } else { + // show heuristic hint on search option screen (only if heuristic is ON by config) prop.put("searchoptions_heuristic", sb.getConfigBool(SwitchboardConstants.HEURISTIC_OPENSEARCH, false)); + // show date search options (only if dates_in_content_dts search target field is active) + prop.put("searchoptions_datesincontent", sb.index.fulltext().getDefaultConfiguration().contains(CollectionSchema.dates_in_content_dts)); } final String former = (post == null) ? "" : post.get("former", ""); final int count = Math.min(100, (post == null) ? 10 : post.getInt("count", 10)); diff --git a/locales/master.lng.xlf b/locales/master.lng.xlf index 1769bf9f0..025e3dd2b 100644 --- a/locales/master.lng.xlf +++ b/locales/master.lng.xlf @@ -10600,6 +10600,12 @@ only pages from top-level-domains + + only pages with a date between &lt;date1&gt; and &lt;date2&gt; in content + + + only pages with &lt;date&gt; in content + only resources from http or https servers