From: Eric Biagiotti Date: Mon, 1 Jul 2019 19:24:26 +0000 (-0400) Subject: 15380: Adds documentation for text search filtering X-Git-Tag: 2.0.0~270^2~1 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/b2ce5b37b621a38ddeb958daaec027d6fefd7213 15380: Adds documentation for text search filtering - Fixes typo in the subproperties filtering section - Adds a link to list common resource method page from the CLI reference page Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti --- diff --git a/doc/api/methods.html.textile.liquid b/doc/api/methods.html.textile.liquid index 4f97ba4cef..59c6a88fbc 100644 --- a/doc/api/methods.html.textile.liquid +++ b/doc/api/methods.html.textile.liquid @@ -107,9 +107,20 @@ table(table table-bordered table-condensed). |@is_a@|string|Arvados object type|@["head_uuid","is_a","arvados#collection"]@| |@exists@|string|Test if a subproperty is present.|@["properties","exists","my_subproperty"]@| + +h4(#textsearchfilter). Filtering using text search + +Resources can also be filtered by searching for a value in attributes of type @string@, @array of strings@, @text@, and @hash@. To use text search, the filter must: + +* Specify @any@ as the attribute +* Use either the @like@ or @ilike@ operator +* Have an operand of type @string@ that is wrapped in the SQL pattern match wildcard character @%@ + +For example, the @["any", "like", "%foo%"]@ filter will return all resources that contain @foo@ in the content of at least one attribute of the previously defined types. + h4(#subpropertyfilters). Filtering on subproperties -Some record type have an additional @properties@ attribute that allows recording and filtering on additional key-value pairs. To filter on a subproperty, the value in the @attribute@ position has the form @properties.user_property@. You may also use JSON-LD / RDF style URIs for property keys by enclosing them in @<...>@ for example @properties.@. Alternately you may also provide a JSON-LD "@context" field, however at this time JSON-LD contexts are not interpreted by Arvados. +Some record types have an additional @properties@ attribute that allows recording and filtering on additional key-value pairs. To filter on a subproperty, the value in the @attribute@ position has the form @properties.user_property@. You may also use JSON-LD / RDF style URIs for property keys by enclosing them in @<...>@ for example @properties.@. Alternately you may also provide a JSON-LD "@context" field, however at this time JSON-LD contexts are not interpreted by Arvados. table(table table-bordered table-condensed). |_. Operator|_. Operand type|_. Description|_. Example| diff --git a/doc/sdk/cli/reference.html.textile.liquid b/doc/sdk/cli/reference.html.textile.liquid index cd70dfd4ae..e1d25aaa23 100644 --- a/doc/sdk/cli/reference.html.textile.liquid +++ b/doc/sdk/cli/reference.html.textile.liquid @@ -74,4 +74,4 @@ Example: @arv collection list --filters '[["name", "=", "PGP VAR inputs"], ["created_at", ">=", "2014-10-01"]]'@ -will return a list of all collections visible to the current user which are named "PGP VAR inputs" and were created on or after October 1, 2014. +will return a list of all collections visible to the current user which are named "PGP VAR inputs" and were created on or after October 1, 2014. See the "Common resource methods":{{site.baseurl}}/api/methods.html#index page for more details on using @list@ and @--filters@.