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 all 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
6 changes: 6 additions & 0 deletions docs/odata-url-conventions/odata-url-conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,11 @@ <h2 id="11-changes-from-earlier-versions"><a name="ChangesfromEarlierVersions" h
<td>New overload for function <code>matchespattern</code> with flags</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/441">441</a></td>
</tr>
<tr class="even">
<td><a href="#SystemQueryOptionsearch">Section 5.1.8</a></td>
<td>Allow alternative <code>$search</code> syntax</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/293">293</a></td>
</tr>
</tbody>
</table>
<h2 id="12-glossary"><a name="Glossary" href="#Glossary">1.2 Glossary</a></h2>
Expand Down Expand Up @@ -1875,6 +1880,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>Clients should be aware that 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>. Services MAY treat keywords defined in the standard <a href="#ODataABNF">OData-ABNF</a> <code>$search</code> syntax as terms to be matched if they are listed in <code>SearchRestrictions/UnsupportedExpressions</code>.</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
7 changes: 7 additions & 0 deletions docs/odata-url-conventions/odata-url-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ ecosystem of reusable client components and libraries.
Section | Feature / Change | Issue
--------|------------------|------
[Section 5.1.1.7.1](#matchespattern)| New overload for function `matchespattern` with flags| [441](https://github.com/oasis-tcs/odata-specs/issues/441)
[Section 5.1.8](#SystemQueryOptionsearch)| Allow alternative `$search` syntax| [293](https://github.com/oasis-tcs/odata-specs/issues/293)

## <a name="Glossary" href="#Glossary">1.2 Glossary</a>

Expand Down Expand Up @@ -3833,6 +3834,12 @@ http://host/service/Products?$search=blue OR green
```
:::

Clients should be aware that services MAY implement search based on a different
syntax provided they advertise this with the annotation `SearchRestrictions/SearchSyntax` defined in
[OData-VocCap](#ODataVocCap). Services MAY treat keywords defined in the standard
[OData-ABNF](#ODataABNF) `$search` syntax as terms to be matched if they are
listed in `SearchRestrictions/UnsupportedExpressions`.

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

Search expressions are used within the
Expand Down
3 changes: 3 additions & 0 deletions odata-url-conventions/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Section | Feature / Change | Issue
[Section ##matchespattern]|
New overload for function `matchespattern` with flags|
[441](https://github.com/oasis-tcs/odata-specs/issues/441)
[Section ##SystemQueryOptionsearch]|
Allow alternative `$search` syntax|
[293](https://github.com/oasis-tcs/odata-specs/issues/293)

## ##subsec Glossary

Expand Down
6 changes: 6 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,12 @@ http://host/service/Products?$search=blue OR green
```
:::

Clients should be aware that services MAY implement search based on a different
syntax provided they advertise this with the annotation `SearchRestrictions/SearchSyntax` defined in
[OData-VocCap](#ODataVocCap). Services MAY treat keywords defined in the standard
[OData-ABNF](#ODataABNF) `$search` syntax as terms to be matched if they are
listed in `SearchRestrictions/UnsupportedExpressions`.

#### ##subsubsubsec Search Expressions

Search expressions are used within the
Expand Down