Skip to content

Commit

Permalink
Merge pull request #3565 from vespa-engine/kkraune/selection
Browse files Browse the repository at this point in the history
Clarify
  • Loading branch information
kkraune authored Jan 6, 2025
2 parents 18c2b71 + 7026196 commit 92c4aa0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions en/reference/document-select-language.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ <h2 id="examples">Examples</h2>
<p><code>music</code></p>
<p>
As applications can have multiple schemas,
match schema and then field-specific:
match document type (schema) and then a specific value in the <code>artistname</code> field:
</p>
<p><code>music and music.artistname == "Coldplay"</code></p>
<p>
The below selects all documents with the above two conditions set.
The first condition states that the documents should be of type music,
Below, the first condition states that the documents should be of type music,
and the author field must exist.
The second states that the field length must be set, and be less than 1000:
The second states that the field length must be set, and be less than or equal to 1000:
</p>
<p><code>music.author and music.length &lt;= 1000</code></p>
<p>
This expression selects all documents where either of the subexpressions are true.
The next expression selects all documents where either of the subexpressions are true.
The first one states that the author field should include the name John Doe, with anything in between or in front.
The <code>\n</code> escape is converted to a newline before the field comparison is done.
Thus requiring the field to end with Doe and a newline for a match to be true.
Expand Down

0 comments on commit 92c4aa0

Please sign in to comment.