Repository navigation
RDoc-4077 Corax: Document scoring of exists() and true - #2681
Open
Danielle9897 wants to merge 3 commits into
Open
Danielle9897 wants to merge 3 commits into
Danielle9897 wants to merge 3 commits into
Conversation
Danielle9897
requested review from
LielNagar,
M4xymm,
maciejaszyk and
poissoncorp
September 24, 2026 20:21
M4xymm
approved these changes
Sep 28, 2026
poissoncorp
approved these changes
Oct 7, 2026
Comment on lines
29
to
31
| # Only documents that contain field 'first_name' will be returned | ||
|
|
||
| results = list(session.advanced.document_query(object_type=Employee).where_exists("first_name")) |
Contributor
There was a problem hiding this comment.
The Python queries use first_name / address.location.latitude, but the RQL tabs and the other Python examples in this PR use the stored names (FirstName, Fax, ...). On Northwind this one returns 0 results. Should be FirstName / Address.Location.Latitude?
Comment on lines
80
to
86
| public function whereExists(?string $fieldName): DocumentQueryInterface; | ||
| ``` | ||
| <br/> | ||
|
|
||
| <TabItem value="whereexists_1" label="whereexists_1"> | ||
| <CodeBlock language="php"> | ||
| {`public function whereExists(?string $fieldName): DocumentQueryInterface; | ||
| `} | ||
| </CodeBlock> | ||
| </TabItem> | ||
|
|
||
| | Parameters | Type | Description | | ||
| | Parameter | Type | Description | | ||
| |----------------|-----------|----------------------------------------------------| | ||
| | **$fieldName** | `?string` | The name / path of the document field to filter by | |
Contributor
There was a problem hiding this comment.
whereExists() takes string, not ?string (DocumentQuery.php: whereExists(string $fieldName)).
Suggested change
| public function whereExists(?string $fieldName): DocumentQueryInterface; | |
| ``` | |
| <br/> | |
| <TabItem value="whereexists_1" label="whereexists_1"> | |
| <CodeBlock language="php"> | |
| {`public function whereExists(?string $fieldName): DocumentQueryInterface; | |
| `} | |
| </CodeBlock> | |
| </TabItem> | |
| | Parameters | Type | Description | | |
| | Parameter | Type | Description | | |
| |----------------|-----------|----------------------------------------------------| | |
| | **$fieldName** | `?string` | The name / path of the document field to filter by | | |
| public function whereExists(string $fieldName): DocumentQueryInterface; | |
| ``` | |
| <br/> | |
| | Parameter | Type | Description | | |
| |----------------|----------|----------------------------------------------------| | |
| | **$fieldName** | `string` | The name / path of the document field to filter by | |
maciejaszyk
reviewed
Oct 7, 2026
| </Admonition> | ||
| ## Assign a boost factor to an index-field | ||
|
|
||
| <Panel heading="Assign a boost factor to an index-field"> |
Member
There was a problem hiding this comment.
BTW This is Lucene only, Corax does not support indexing-time field boosting
maciejaszyk
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue link
https://issues.ravendb.net/issue/RDoc-4077/Corax-Document-scoring-of-exists-and-true
Additional description
exists()contributes1 × query boostonce per matching document, whilewhere truecontributes no score.C#
@maciejaszyk pls review the
*-csharpfilesNode.js
@M4xymm pls review the
*-nodejs.mdxfilesPython & PHP
@poissoncorp pls review the
*-python.mdx&*-php.mdxfilesJava
@LielNagar pls review the
*-java.mdxfilesType of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI