mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
Add missing settings to autocrawl settings page
This commit is contained in:
parent
7a7a1277bd
commit
7d6e0d8470
|
@ -541,7 +541,7 @@ proxyURL.useforresults=false
|
||||||
# Autocrawl configuration
|
# Autocrawl configuration
|
||||||
autocrawl=false
|
autocrawl=false
|
||||||
autocrawl.index.text=true
|
autocrawl.index.text=true
|
||||||
autocrawl.index.meia=true
|
autocrawl.index.media=true
|
||||||
autocrawl.ratio=50
|
autocrawl.ratio=50
|
||||||
autocrawl.rows=100
|
autocrawl.rows=100
|
||||||
autocrawl.days=1
|
autocrawl.days=1
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
<dd><input id="autocrawlShallow" name="autocrawlShallow" type="number" min="0" max="2" step="1" size="1" maxlength="1" value="#[autocrawlShallow]#" /></dd>
|
<dd><input id="autocrawlShallow" name="autocrawlShallow" type="number" min="0" max="2" step="1" size="1" maxlength="1" value="#[autocrawlShallow]#" /></dd>
|
||||||
<dt>Deep crawl depth (1 to 5):</dt>
|
<dt>Deep crawl depth (1 to 5):</dt>
|
||||||
<dd><input id="autocrawlDeep" name="autocrawlDeep" type="number" min="1" max="5" step="1" size="1" maxlength="1" value="#[autocrawlDeep]#" /></dd>
|
<dd><input id="autocrawlDeep" name="autocrawlDeep" type="number" min="1" max="5" step="1" size="1" maxlength="1" value="#[autocrawlDeep]#" /></dd>
|
||||||
|
<dt>Index text:</dt>
|
||||||
|
<dd><input id="autocrawlText" name="autocrawlText" type="checkbox" #(autocrawlText)#::checked="checked"#(/autocrawlText)# /></dd>
|
||||||
|
<dt>Index media:</dt>
|
||||||
|
<dd><input id="autocrawlMedia" name="autocrawlMedia" type="checkbox" #(autocrawlMedia)#::checked="checked"#(/autocrawlMedia)# /></dd>
|
||||||
|
|
||||||
<dt><input type="submit" name="save" class="btn btn-primary" value="Save" /></dt>
|
<dt><input type="submit" name="save" class="btn btn-primary" value="Save" /></dt>
|
||||||
</dl>
|
</dl>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -18,6 +18,8 @@ public class Autocrawl_p {
|
||||||
String autocrawlQuery = sb.getConfig(SwitchboardConstants.AUTOCRAWL_QUERY, "*:*");
|
String autocrawlQuery = sb.getConfig(SwitchboardConstants.AUTOCRAWL_QUERY, "*:*");
|
||||||
int autocrawlShallow = Integer.parseInt(sb.getConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, "1"));
|
int autocrawlShallow = Integer.parseInt(sb.getConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, "1"));
|
||||||
int autocrawlDeep = Integer.parseInt(sb.getConfig(SwitchboardConstants.AUTOCRAWL_DEEP_DEPTH, "3"));
|
int autocrawlDeep = Integer.parseInt(sb.getConfig(SwitchboardConstants.AUTOCRAWL_DEEP_DEPTH, "3"));
|
||||||
|
boolean autocrawlText = sb.getConfigBool(SwitchboardConstants.AUTOCRAWL_INDEX_TEXT, true);
|
||||||
|
boolean autocrawlMedia = sb.getConfigBool(SwitchboardConstants.AUTOCRAWL_INDEX_MEDIA, true);
|
||||||
|
|
||||||
if (post != null) {
|
if (post != null) {
|
||||||
autocrawlEnable = post.getBoolean("autocrawlEnable");
|
autocrawlEnable = post.getBoolean("autocrawlEnable");
|
||||||
|
@ -39,6 +41,8 @@ public class Autocrawl_p {
|
||||||
if (post.containsKey("autocrawlDeep")) {
|
if (post.containsKey("autocrawlDeep")) {
|
||||||
autocrawlDeep = post.getInt("autocrawlDeep", 3);
|
autocrawlDeep = post.getInt("autocrawlDeep", 3);
|
||||||
}
|
}
|
||||||
|
autocrawlText = post.getBoolean("autocrawlText");
|
||||||
|
autocrawlMedia = post.getBoolean("autocrawlMedia");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autocrawlRatio > 500) {
|
if (autocrawlRatio > 500) {
|
||||||
|
@ -75,6 +79,8 @@ public class Autocrawl_p {
|
||||||
sb.setConfig(SwitchboardConstants.AUTOCRAWL_QUERY, autocrawlQuery);
|
sb.setConfig(SwitchboardConstants.AUTOCRAWL_QUERY, autocrawlQuery);
|
||||||
sb.setConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, autocrawlShallow);
|
sb.setConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, autocrawlShallow);
|
||||||
sb.setConfig(SwitchboardConstants.AUTOCRAWL_DEEP_DEPTH, autocrawlDeep);
|
sb.setConfig(SwitchboardConstants.AUTOCRAWL_DEEP_DEPTH, autocrawlDeep);
|
||||||
|
sb.setConfig(SwitchboardConstants.AUTOCRAWL_INDEX_TEXT, autocrawlText);
|
||||||
|
sb.setConfig(SwitchboardConstants.AUTOCRAWL_INDEX_MEDIA, autocrawlMedia);
|
||||||
|
|
||||||
sb.initAutocrawl(autocrawlEnable);
|
sb.initAutocrawl(autocrawlEnable);
|
||||||
|
|
||||||
|
@ -88,6 +94,8 @@ public class Autocrawl_p {
|
||||||
prop.put("autocrawlQuery", autocrawlQuery);
|
prop.put("autocrawlQuery", autocrawlQuery);
|
||||||
prop.put("autocrawlShallow", autocrawlShallow);
|
prop.put("autocrawlShallow", autocrawlShallow);
|
||||||
prop.put("autocrawlDeep", autocrawlDeep);
|
prop.put("autocrawlDeep", autocrawlDeep);
|
||||||
|
prop.put("autocrawlText", autocrawlText);
|
||||||
|
prop.put("autocrawlMedia", autocrawlMedia);
|
||||||
|
|
||||||
return prop;
|
return prop;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user