mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
Add search profiles for wiki, forum and docs.
This commit is contained in:
parent
bd2c3855ed
commit
d86e8522e2
@ -19,6 +19,9 @@ public enum SearchProfile {
|
||||
FOOD("food", SearchSetIdentifier.NONE),
|
||||
CRAFTS("crafts", SearchSetIdentifier.NONE),
|
||||
CLASSICS("classics", SearchSetIdentifier.NONE),
|
||||
FORUM("forum", SearchSetIdentifier.NONE),
|
||||
WIKI("wiki", SearchSetIdentifier.NONE),
|
||||
DOCS("docs", SearchSetIdentifier.NONE),
|
||||
;
|
||||
|
||||
|
||||
@ -56,6 +59,15 @@ public enum SearchProfile {
|
||||
if (this == PLAIN_TEXT) {
|
||||
subquery.searchTermsAdvice.add("format:plain");
|
||||
}
|
||||
if (this == WIKI) {
|
||||
subquery.searchTermsAdvice.add("generator:wiki");
|
||||
}
|
||||
if (this == FORUM) {
|
||||
subquery.searchTermsAdvice.add("generator:forum");
|
||||
}
|
||||
if (this == DOCS) {
|
||||
subquery.searchTermsAdvice.add("generator:docs");
|
||||
}
|
||||
if (this == FOOD) {
|
||||
subquery.searchTermsAdvice.add(HtmlFeature.CATEGORY_FOOD.getKeyword());
|
||||
}
|
||||
|
@ -17,6 +17,11 @@
|
||||
<option {{#eq profile "vintage"}}selected{{/eq}} value="vintage">Web 1.0</option>
|
||||
<option {{#eq profile "plain-text"}}selected{{/eq}} value="plain-text">Text Files</option>
|
||||
</optgroup>
|
||||
<optgroup label="Category">
|
||||
<option {{#eq profile "wiki"}}selected{{/eq}} value="wiki">Wiki</option>
|
||||
<option {{#eq profile "forum"}}selected{{/eq}} value="forum">Forum</option>
|
||||
<option {{#eq profile "docs"}}selected{{/eq}} value="docs">Docs (experimental)</option>
|
||||
</optgroup>
|
||||
<optgroup label="Topics Search">
|
||||
<option {{#eq profile "food"}}selected{{/eq}} value="food">Recipes 🍳</option>
|
||||
<option {{#eq profile "crafts"}}selected{{/eq}} value="crafts">Crafts 🪡🔨 (WIP; mostly textile-craft)</option>
|
||||
|
Loading…
Reference in New Issue
Block a user