Add documentation for collapse, oversample, truncate_hits processors - #5881
Conversation
Signed-off-by: Michael Froh <froh@amazon.com>
87f7e33 to
f580b30
Compare
kolchfa-aws
left a comment
There was a problem hiding this comment.
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. |
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
natebower
left a comment
There was a problem hiding this comment.
@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.
"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.
"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.
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.
Should "color" be color?
Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
|
@natebower I addressed all your comments and rewrote the sentence on line 18 as a list of steps. Thanks! |
natebower
left a comment
There was a problem hiding this comment.
LGTM with one minor deletion. Thanks!
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Description
Adds documentation for the
collapse,oversample, andtrucate_hitssearch 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.