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

Alternative search syntax #1918

Merged
merged 9 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,7 @@ <h3 id="518-system-query-option-search"><a name="SystemQueryOptionsearch" href="
<p>Example 135: all products that are blue or green. It is up to the service to decide what makes a product blue or green.</p>
<pre><code>http://host/service/Products?$search=blue OR green</code></pre>
</div>
<p>Services MAY implement search based on a different syntax provided they advertise this with the annotation <code>SearchRestrictions/SearchSyntax</code> defined in <a href="#ODataVocCap">OData-VocCap</a>. Clients are advised to evalute this annotation, because it governs what result they can expect for a given search request. Especially if <code>SearchRestrictions/Searchable</code> is false, the service may treat keywords that appear in the <a href="#ODataABNF">OData-ABNF</a> <code>search</code> syntax as terms to be matched.</p>
<h4 id="5181-search-expressions"><a name="SearchExpressions" href="#SearchExpressions">5.1.8.1 Search Expressions</a></h4>
<p>Search expressions are used within the <a href="#SystemQueryOptionsearch"><code>$search</code></a> system query option to request entities matching the specified expression. Leading and trailing spaces are not considered part of the search expression.</p>
<p><em>Terms</em> can be any single word to be matched within the expression.</p>
Expand Down
8 changes: 8 additions & 0 deletions docs/odata-url-conventions/odata-url-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3828,6 +3828,14 @@ http://host/service/Products?$search=blue OR green
```
:::

Services MAY implement search based on a different syntax provided they advertise
this with the annotation `SearchRestrictions/SearchSyntax` defined in
[OData-VocCap](#ODataVocCap). Clients are advised to evalute this annotation,
because it governs what result they can expect for a given search request.
Especially if `SearchRestrictions/Searchable` is false, the service may treat
keywords that appear in the [OData-ABNF](#ODataABNF) `search` syntax
as terms to be matched.

#### <a name="SearchExpressions" href="#SearchExpressions">5.1.8.1 Search Expressions</a>

Search expressions are used within the
Expand Down
8 changes: 8 additions & 0 deletions odata-url-conventions/5 Query Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2379,6 +2379,14 @@ http://host/service/Products?$search=blue OR green
```
:::

Services MAY implement search based on a different syntax provided they advertise
this with the annotation `SearchRestrictions/SearchSyntax` defined in
[OData-VocCap](#ODataVocCap). Clients are advised to evalute this annotation,
because it governs what result they can expect for a given search request.
Especially if `SearchRestrictions/Searchable` is false, the service may treat
keywords that appear in the [OData-ABNF](#ODataABNF) `search` syntax
as terms to be matched.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open issue from TC 2024-04-17:
If SearchRestrictions/Searchable is true, may the service treat keywords that it declares as SearchRestrictions/UnsupportedExpressions as terms to be matched?
@mikepizzo said "no", @HeikoTheissen said "yes".


#### ##subsubsubsec Search Expressions

Search expressions are used within the
Expand Down