-
Notifications
You must be signed in to change notification settings - Fork 506
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
Add documentation for collapse, oversample, truncate_hits processors #5881
Add documentation for collapse, oversample, truncate_hits processors #5881
Conversation
Signed-off-by: Michael Froh <[email protected]>
87f7e33
to
f580b30
Compare
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.
Thanks so much, @msfroh! The users will definitely appreciate the clear explanations and a more in-depth example.
|
||
Field | Data type | Description | ||
:--- | :--- | :--- | ||
`sample_factor` | Number | The multiplicative factor (>= 1.0) that will be applied to the `size` parameter before processing the search request. Required. |
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.
Is this a float?
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.
Yes
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
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.
@msfroh @kolchfa-aws Please see my comments and changes and let me know if you have any questions. I'd like to read line 18 in the last file before approving, so please tag me when complete. Thanks!
|
||
# Collapse processor | ||
|
||
The `collapse` response processor discards hits that have the same value for some field as a previous document in the result set. |
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.
"that have the same value for a particular field as a previous document in the result set"?
# Collapse processor | ||
|
||
The `collapse` response processor discards hits that have the same value for some field as a previous document in the result set. | ||
This is similar to the `collapse` parameter that can be passed in a search request, but the response processor is applied to the |
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 similar to using the collapse
parameter in a search request"?
|
||
### Collapse without oversample | ||
|
||
In this example, you request the top 3 documents before collapsing on the "color" field. Because the first two documents have the same `color`, the second one is discarded, |
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 "color" be color
?
|
||
### Oversample, collapse, and truncate | ||
|
||
Now, you will use the `oversampling_collapse_pipeline` that requests the top 9 documents (multiplying the size by 3), deduplicates by "color", |
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 "color" be color
?
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
@natebower I addressed all your comments and rewrote the sentence on line 18 as a list of steps. Thanks! |
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.
LGTM with one minor deletion. Thanks!
Signed-off-by: Fanit Kolchina <[email protected]>
Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]>
Description
Adds documentation for the
collapse
,oversample
, andtrucate_hits
search pipeline processors.These were added to OpenSearch in opensearch-project/OpenSearch#9405.
Issues Resolved
Fixes #5151
Checklist
For more information on following Developer Certificate of Origin and signing off your commits, please check here.