You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the query and option parameters in ft:query() function in the Querying the Index section can be improved
To drill down by a given facet dimension and value, pass a key "facets" in the options map given in the third parameter of ft:query
It's not clear that user can combine query in XML with options as a map
options parameter as a map in the documentation contains only "facets" as a key, but it can contain other keys, like "default-operator", "leading-wildcard", that correspond to child elements of the <options> element, for example
let $options := map {
"default-operator" : "or"
}
Documentation should mention that user can use XML version of the query for full-text search of the fields associated with the element by adding @field attribute to the <term> and others query child elements, except <near>. For example, the following query searches in the entire (dictionary) entry:
When set to yes, * or ? are allowed as the first character of a PrefixQuery and WildcardQuery. Note that this can produce very slow queries on big indexes.
The terms PrefixQuery and WildcardQuery are not mentioned anywhere else on this page and come from the source code. Definition should be simpler, for example:
When set to yes, * or ? are allowed as the first character of a query. Note that this can produce very slow queries on big indexes.
From my experience, <leading-wildcard>yes</leading-wildcard> or map { "leading-wildcard": "yes" } has effect only if the query is defined in Lucene format, not in XML format.
For example, following queries returns the same results:
While the following query throws an error (Syntax error in Lucene query string: Cannot parse 'lemma:*epes': '*' or '?' not allowed as first character in WildcardQuery):
In the list of elements occurring in query description, the <fuzzy> element is missing. Proposed definition:
Will match terms with an edit distance of at most @max-edits to the term. The value of @max-edits attribute is an integer between 0 and 2, default is 2. The similarity measurement is based on the Damerau-Levenshtein (optimal string alignment) algorithm.
<regex> A regular expression which will be matched against the terms of a document. Can be used instead of a element. For example:
Documentation should mention that not all regular expressions are allowed, for example ^ for the beginning of string or $ for the end of string. Link to the Lucene documentation could help with this.
Please provide the following
exist-db version: 6.2.0
documentation version: 6.2.0, 3Q21
The text was updated successfully, but these errors were encountered:
Thank you Boris. Would you be able to contribute a PR with these edits? The problem with leading wildcard not being applied in xml syntax smells like a bug to me. If you have an questions feel free to ask, I know that editing the docs can be intimidating first time around.
Description of the
query
andoption
parameters inft:query()
function in the Querying the Index section can be improvedoptions
parameter as a map in the documentation contains only "facets" as a key, but it can contain other keys, like "default-operator", "leading-wildcard", that correspond to child elements of the<options>
element, for example@field
attribute to the<term>
and others query child elements, except<near>
. For example, the following query searches in the entire (dictionary) entry:In contrast, the following query searches only within the
lemma
field of the (dictionary) entry:PrefixQuery
andWildcardQuery
are not mentioned anywhere else on this page and come from the source code. Definition should be simpler, for example:When set to yes,
*
or?
are allowed as the first character of a query. Note that this can produce very slow queries on big indexes.<leading-wildcard>yes</leading-wildcard>
ormap { "leading-wildcard": "yes" }
has effect only if the query is defined in Lucene format, not in XML format.For example, following queries returns the same results:
While the following query throws an error (
Syntax error in Lucene query string: Cannot parse 'lemma:*epes': '*' or '?' not allowed as first character in WildcardQuery
):<fuzzy>
element is missing. Proposed definition:Will match terms with an edit distance of at most
@max-edits
to the term. The value of@max-edits
attribute is an integer between0
and2
, default is2
. The similarity measurement is based on the Damerau-Levenshtein (optimal string alignment) algorithm.^
for the beginning of string or$
for the end of string. Link to the Lucene documentation could help with this.Please provide the following
6.2.0
6.2.0
,3Q21
The text was updated successfully, but these errors were encountered: