-
Notifications
You must be signed in to change notification settings - Fork 137
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
RDoc-2514 Explain Boosting options + Update indexing configuration #1738
RDoc-2514 Explain Boosting options + Update indexing configuration #1738
Conversation
}`; | ||
} | ||
} | ||
//endregion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ml054
My Q was about this index and the one below
Can we use Boost
with JS index in Node.js client ?
The only implementation I saw in the tests was with AbstractCsharpIndexCreationTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in query yes, in JS index I don't see such feature.
// | ||
// * Unless configured otherwise, the resulting documents will be ordered by their score. | ||
// | ||
// * Search is case-insensitive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary information I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is Not incorrect (as I saw when I ran the above), then I would prefer to leave this info.
For now, just modified the location of this comment to be less noticeable as follows:
// * Results will contain all Employee documents that have
// EITHER 'English' OR 'Italian' in their 'Notes' field (case-insensitive).
//
// * Matching documents that contain 'Italian' will get a HIGHER score
// than those that contain 'English'.
//
// * Unless configured otherwise, the resulting documents will be ordered by their score.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant // * Search is case-insensitive.
but OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I provide the text about search being case-sensitive is because the text in my comment says the following;
Results will contain all Employee documents that have EITHER 'English' OR 'Italian' in their 'Notes' field
my comment specified 'English' OR 'Italian'
but results will also contain documents having 'english' OR 'italian' (in the supplied example)
so that is why I thought to mention that.
{CODE-TAB:csharp:DocumentQuery boost_3@ClientApi\Session\Querying\TextSearch\BoostResults.cs /} | ||
{CODE-TAB-BLOCK:sql:RQL} | ||
from "Employees" where | ||
(search(Notes, "English") or boost(search(Notes, "Italian"), 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brackets are not required here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the excess brackets
.ToList(); | ||
|
||
// Because index-field 'ShipToCountry' was boosted (inside the index definition), | ||
// then documents containing 'Poland' in their 'ShipTo.Country' field will get a higher score than |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dot from field name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I wrote ShipTo.Country
is because at this point the sentence refers to the document-field.
As I understand - the content of index-field ShipToCountry
is composed of the content from the document-field ShipTo.Country
.
So you boost the index-field, but the resulting documents (in this example) are those that contain the matching value in their document-field
=> So is that incorrect ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have asked because you have index definition with different fieldname but OK.
@@ -0,0 +1,29 @@ | |||
# Indexes: Boosting | |||
|
|||
A feature that RavenDB leverages from Lucene is called Boosting. This feature gives you the ability to manually tune the relevance level of matching documents when performing a query. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use same text as for dotnet version here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I added (just) the text to the Java markdown files
but, it needs to be said that for my current scope of work, as was done for previous PRs,
I do not modify, test, or provide new Java examples, I concentrate on C# and Node.js
If a new C# markdown file needs to be created in 6.0 for example, then the Java files (and other clients files)
must be copied over to the folder, otherwise the language will not be visible at run time.
- **Scope**: Server-wide or per database | ||
- **Default**: `6` | ||
- **Scope**: Server-wide, or per database, or per index | ||
- **Alias:** `Indexing.Lucene.Analyzers.NGram.MaxGram` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls see my Q about Lucene in this related issue:
https://issues.hibernatingrhinos.com/issue/RavenDB-19207/Create-new-aliases-for-Lucene-Indexing-configuration#focus=Comments-67-1048397.0-0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered in ticket
c57d139
to
35c8dfa
Compare
… order alphabetically
Related issues:
https://issues.hibernatingrhinos.com/issue/RDoc-2514/Explain-Boosting-options-when-indexing
https://issues.hibernatingrhinos.com/issue/RDoc-2552/Disable-OrderByScore-when-Boosting-is-involved-Update-indexing-configuration-file
https://issues.hibernatingrhinos.com/issue/RDoc-2332/Add-information-about-supporting-document-boost-in-documentation
https://issues.hibernatingrhinos.com/issue/RDoc-2380/Add-missing-indexing-configuration-keys
Work included:
../indexing-configuration
files:Update the indexing-configuration with all missing keys
../indexes/boosting
files:Explain the 2 ways to apply boosting inside the index definition (on index-field vs index-entry)
Added Javascript index examples + updated Node.js
../sort-query-results
files:Organize "how to get the score" in a single location.
../boost-search-results
files:Explain the configurable option to order-by-score when Boosting is involved - in all relevant places
@ml054 The main Node.js files to check in this PR is:
@maciejaszyk The main C# files to check: