-
Notifications
You must be signed in to change notification settings - Fork 3
New Search page with detailled explanations #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've left some notes regarding minor things (some personal preference), and also triggered the linting workflow which identified some other things.
docs/Search.md
Outdated
| * ``label:Somelabel`` - articles that belong to a specified label | ||
| * ``tag:mytag`` - articles which have specified tag | ||
| * ``title:``, ``author:`` - self explanatory | ||
| <a id="text_keyword"></a>A keyword can be a **text keyword**. A text keyword is a single word such as `ocean`, or successive words enclosed in quotes such as `"pacific ocean"`. These keywords are searched using PostgreSQL [Full Text Search](#full_text_search) engine. This engine supports [word stemming](#word_stemming), and [logical operators](#logical_operators). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please go with kebab case (e.g.
text-keyword) to match what "Just the Docs" generates for headlines. using PostgreSQL'sorusing the PostgreSQL- I understand the current wording was in use before this PR, but it seems like a good time to start tweaking things. I plan on manually reviewing the rest of the site's content at some point.
- There's at least one similar instance below.
docs/Search.md
Outdated
|
|
||
| A keyword starting with `-` (negative sign) is considered a negative match. The `-` can be applied before any type of keyword. For example `-unwanted`, `-"unwanted words"`, `-title:unwanted`, `-tag:"unwanted words"` or `-@yesterday`. | ||
|
|
||
| A logical `AND` operator is applied between keywords. For example `ocean "tree flower" note:true -title:"orange color"` searches for articles containing the word _ocean_ (with [stemming](#word_stemming)) AND the sentence _"tree flower"_ (with [stemming](#word_stemming)) AND a note AND a title not containing the string _"orange color"_. This _AND_ must not be written, it is applied by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AND the sentence --> AND the phrase
docs/Search.md
Outdated
|
|
||
| Word stemming is powerful, but has one drawback: both languages of the feed and of the search query have to be well configured. Indeed, the word stemming process depends on the language: French and English words are not stemmed in the same way, so comparing them may lead to unexpected results. | ||
|
|
||
| On the Tiny Tiny RSS interface, there is a special language named _Simple_. Word stemming in the _Simple_ language is almost equivalent to exact string matching. With the _Simple_ language, only punctuation such as commas are removed. The power of word stemming is thus not applied, but it works well in usages with multiple languages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Tiny Tiny RSS there is a special language named _Simple_.
docs/Search.md
Outdated
|
|
||
| {: warning } | ||
| > Due to current parser limitations, the handling of space is important: | ||
| > - Spaces are **compulsory around words enclosed in quotes** such as `"black sea"`, otherwise the parser does not detect the quotes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compulsory --> required
docs/Search.md
Outdated
| > - Spaces are **recommended around logical operators**, otherwise highlighting may not work correctly. | ||
| {: warning } | ||
| > Due to current parser limitations, when at least one operator is detected, Tiny Tiny RSS does not apply the default _AND_ operator. Tiny Tiny RSS expects the whole query to be well formatted. For example the query `one two` works because no operator is detected, so tt-rss adds the _AND_. However, `one two & three` fails because tt-rss detects the `&` operator, so expects the whole query to be well formatted, and does not add the missing `&` between the words `one` and `two`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when at least one operator is detected Tiny Tiny RSS does not- might be good to use
Tiny Tiny RSSfor consistency
docs/Search.md
Outdated
| > Due to current parser limitations, when at least one operator is detected, Tiny Tiny RSS does not apply the default _AND_ operator. Tiny Tiny RSS expects the whole query to be well formatted. For example the query `one two` works because no operator is detected, so tt-rss adds the _AND_. However, `one two & three` fails because tt-rss detects the `&` operator, so expects the whole query to be well formatted, and does not add the missing `&` between the words `one` and `two`. | ||
| {: .note } | ||
| > When a search query contains [name-value](#namevalue_keyword)/[date](#date_keyword) keywords and [text keywords](#text_keyword) using _logical operators_, it is recommended to write the [text keywords](#text_keyword) at the end (or the beginning), and to surround them with parenthesis. For example when reading `-title:submarine @yesterday ( pacific | atlantic )` one can easily understand that the parenthesis contains a complex fragment, that has to be well formatted with no missing operator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parenthesis-->parenthesesa complex fragment that has
docs/Search.md
Outdated
| > When a search query contains [name-value](#namevalue_keyword)/[date](#date_keyword) keywords and [text keywords](#text_keyword) using _logical operators_, it is recommended to write the [text keywords](#text_keyword) at the end (or the beginning), and to surround them with parenthesis. For example when reading `-title:submarine @yesterday ( pacific | atlantic )` one can easily understand that the parenthesis contains a complex fragment, that has to be well formatted with no missing operator. | ||
| {: .note } | ||
| > Due to current parser limitations, the `-` negation does not work before a parenthesis. It only works before a [text keyword](#text_keyword). When a parenthesis group needs to be negated, use the `!` operator. For example: `-title:submarine @yesterday ( ! ( pacific | atlantic ) )` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not work before a parenthesis (only before a [text keyword](#text_keyword)).
This new help page describes the various types of keywords, and known limitations.