Skip to content
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

docs(v1): improve search docs (DSP-1553) #1848

Merged
merged 1 commit into from Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 12 additions & 11 deletions docs/03-apis/api-v1/reading-and-searching-resources.md
Expand Up @@ -310,32 +310,32 @@ operators:

Explanation of the comparison operators:

* `EQ`: checks if a resource's value *equals* the search value. In
* `EQ` (equal): checks if a resource's value *equals* the search value. In
case of a text value type, it checks for identity of the strings
compared. In case of a date value type, equality is given if the
dates overlap in any way. Since dates are internally always
treated as periods, equality is given if a date value's period
ends after or equals the start of the defined period and a date
value's period starts before or equals the end of the defined
period.
* `!EQ`: checks if a resource's value *does not equal* the search
* `!EQ` (not equal): checks if a resource's value *does not equal* the search
value. In case of a text value type, it checks if the compared
strings are different. In case of a date value type, inequality
is given if the dates do not overlap in any way, meaning that a
date starts after the end of the defined period or ends before
the beginning of the defined period (dates are internally always
treated as periods, see above).
* `GT`: checks if a resource's value is *greater than* the search
* `GT` (greater than): checks if a resource's value is *greater than* the search
value. In case of a date value type, it assures that a period
begins after the indicated period's end.
* `GT_EQ`: checks if a resource's value *equals or is greater
* `GT_EQ` (greater than or equal): checks if a resource's value *equals or is greater
than* the search value. In case of a date value type, it assures
that the periods overlap in any way (see `EQ`) **or** that the
period starts after the indicated period's end (see `GT`).
* `LT`: checks if a resource's value is *lower than* the search
* `LT` (less than): checks if a resource's value is *lower than* the search
value. In case of a date value type, it assures that a period
ends before the indicated period's start.
* `LT_EQ`: checks if a resource's value *equals or is lower than*
* `LT_EQ` (less than or equal): checks if a resource's value *equals or is lower than*
the search value. In case of a date value type, it assures that
the periods overlap in any way (see `EQ`) **or** that the period
ends before the indicated period's start (see `LT`).
Expand All @@ -344,12 +344,13 @@ Explanation of the comparison operators:
value when using EXISTS: "searchval="**. Otherwise, the query
syntax rules would be violated.
* `MATCH`: checks if a resource's text value *matches* the search
value. The behaviour depends on the used triplestore's full text
index, see [Lucene](../../08-lucene/index.md).
value, see [Lucene Query Parser Syntax](../../08-lucene/lucene-query-parser-syntax.md).
* `LIKE`: checks if the search value is contained in a resource's
text value.
* `!LIKE`: checks if the search value is not contained in a
resource's text value.
text value using the SPARQL [REGEX](https://www.w3.org/TR/sparql11-query/#func-regex) function,
thus supporting regular expressions.
* `!LIKE` (not like): checks if the search value is not contained in a
resource's text value using the SPARQL [REGEX](https://www.w3.org/TR/sparql11-query/#func-regex) function,
thus supporting regular expressions.
* `MATCH_BOOLEAN`: checks if a resource's text value *matches* the
provided list of positive (exist) and negative (do not exist)
terms. The list takes this form: `([+-]term\s)+`.
Expand Down
1 change: 1 addition & 0 deletions docs/08-lucene/index.md
Expand Up @@ -22,3 +22,4 @@ License along with DSP. If not, see <http://www.gnu.org/licenses/>.
The Lucene full-text index provided by the triplestore is used to perform full-text searches in Knora.
The exact behavior can be different depending on the triplestore, e.g., GraphDB or Fuseki.

* [Lucene Query Parser Syntax](lucene-query-parser-syntax.md)