Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

mention date search parameter in search option help (index.html)

regere25f2ee88b6e
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 @@
<dd>only pages with as-author-anotated &lt;author&gt;</dd>
<dt>tld:&lt;tld&gt;</dt>
<dd>only pages from top-level-domains &lt;tld&gt;</dd>
+ #(datesincontent)#::
+ <dt>on:&lt;date&gt;</dt>
+ <dd>only pages with &lt;date&gt; in content</dd>
+ <dt>from:&lt;date1&gt; to:&lt;date2&gt;</dt>
+ <dd>only pages with a date between &lt;date1&gt; and &lt;date2&gt; in content</dd>
+ #(/datesincontent)#
<dt>/http</dt>
<dd>only resources from http or https servers</dd>
<dt>/ftp</dt>
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 @@
<trans-unit id="e5eb9948" xml:space="preserve" approved="no" translate="yes">
<source>only pages from top-level-domains</source>
</trans-unit>
+ <trans-unit id="6b8b308b" xml:space="preserve" approved="no" translate="yes">
+ <source>only pages with a date between &amp;lt;date1&amp;gt; and &amp;lt;date2&amp;gt; in content</source>
+ </trans-unit>
+ <trans-unit id="7fae2eb1" xml:space="preserve" approved="no" translate="yes">
+ <source>only pages with &amp;lt;date&amp;gt; in content</source>
+ </trans-unit>
<trans-unit id="f0ec5b4f" xml:space="preserve" approved="no" translate="yes">
<source>only resources from http or https servers</source>
</trans-unit>