Add missing settings to autocrawl settings page

pull/40/head
Ryszard Goń 9 years ago
parent 7a7a1277bd
commit 7d6e0d8470

@ -541,7 +541,7 @@ proxyURL.useforresults=false
# Autocrawl configuration
autocrawl=false
autocrawl.index.text=true
autocrawl.index.meia=true
autocrawl.index.media=true
autocrawl.ratio=50
autocrawl.rows=100
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>
<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>
<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>
</dl>
</form>

@ -18,6 +18,8 @@ public class Autocrawl_p {
String autocrawlQuery = sb.getConfig(SwitchboardConstants.AUTOCRAWL_QUERY, "*:*");
int autocrawlShallow = Integer.parseInt(sb.getConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, "1"));
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) {
autocrawlEnable = post.getBoolean("autocrawlEnable");
@ -39,6 +41,8 @@ public class Autocrawl_p {
if (post.containsKey("autocrawlDeep")) {
autocrawlDeep = post.getInt("autocrawlDeep", 3);
}
autocrawlText = post.getBoolean("autocrawlText");
autocrawlMedia = post.getBoolean("autocrawlMedia");
}
if (autocrawlRatio > 500) {
@ -75,6 +79,8 @@ public class Autocrawl_p {
sb.setConfig(SwitchboardConstants.AUTOCRAWL_QUERY, autocrawlQuery);
sb.setConfig(SwitchboardConstants.AUTOCRAWL_SHALLOW_DEPTH, autocrawlShallow);
sb.setConfig(SwitchboardConstants.AUTOCRAWL_DEEP_DEPTH, autocrawlDeep);
sb.setConfig(SwitchboardConstants.AUTOCRAWL_INDEX_TEXT, autocrawlText);
sb.setConfig(SwitchboardConstants.AUTOCRAWL_INDEX_MEDIA, autocrawlMedia);
sb.initAutocrawl(autocrawlEnable);
@ -88,6 +94,8 @@ public class Autocrawl_p {
prop.put("autocrawlQuery", autocrawlQuery);
prop.put("autocrawlShallow", autocrawlShallow);
prop.put("autocrawlDeep", autocrawlDeep);
prop.put("autocrawlText", autocrawlText);
prop.put("autocrawlMedia", autocrawlMedia);
return prop;
}

Loading…
Cancel
Save