Skip to content
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

document search after #4265

Merged
merged 5 commits into from
Dec 14, 2023
Merged

document search after #4265

merged 5 commits into from
Dec 14, 2023

Conversation

trinity-1686a
Copy link
Contributor

Description

fix #4077
I'm not sure what to add more than that line.

somewhat unrelated, document possible improvements to the partial_request_cache, that apply particularly to search_after

@trinity-1686a trinity-1686a force-pushed the trinity--doc-search-after branch from c1ef364 to dcf4de7 Compare December 12, 2023 10:30
@fmassot
Copy link
Contributor

fmassot commented Dec 12, 2023

Can you add an example and explain that timestamp must be expressed in nanoseconds?

@@ -169,7 +169,7 @@ following syntax.
{
// ...
"sort" : [
{ "timestamp" : {"order" : "asc"}},
{ "timestamp" : {"format": "epoch_millis","order" : "asc"}},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprise..... I went for epoch_millis_as_int format as elasticsearch returns milliseconds as strings with format epoch_millis. Thus I added the ugly as_int to avoid confusion ://///

Suggested change
{ "timestamp" : {"format": "epoch_millis","order" : "asc"}},
{ "timestamp" : {"format": "epoch_millis_as_int","order" : "asc"}},

@@ -353,7 +353,7 @@ fn validate_sort_by_field(
has_timestamp_format: bool,
schema: &Schema,
) -> crate::Result<()> {
if field_name == "_score" {
if ["_score", "_shard_doc", "_doc"].contains(&field_name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, thank you for fixing this; I totally forgot it.

Do we have tests on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so

@fmassot
Copy link
Contributor

fmassot commented Dec 12, 2023

Approved, can you just take into account my minor comments?

@trinity-1686a trinity-1686a enabled auto-merge (squash) December 14, 2023 10:03
@trinity-1686a trinity-1686a merged commit 59d5498 into main Dec 14, 2023
4 checks passed
@trinity-1686a trinity-1686a deleted the trinity--doc-search-after branch December 14, 2023 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docs on search_after ES API
2 participants