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

fixes order_by_u64_field and order_by_fast_field should allow sorting in ascending order #1676 #2111

Merged
merged 9 commits into from
Jul 6, 2023
Merged

fixes order_by_u64_field and order_by_fast_field should allow sorting in ascending order #1676 #2111

merged 9 commits into from
Jul 6, 2023

Conversation

naveenann
Copy link
Contributor

No description provided.

))
.unwrap();
index_writer
.add_document(doc!(
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add an empty doc to the test

index_writer.add_document(doc!()).unwrap();

Copy link
Contributor

@PSeitz PSeitz Jul 4, 2023

Choose a reason for hiding this comment

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

sorry I meant a doc without a value

index_writer.add_document(doc!(title => "empty beer"))

Copy link
Contributor Author

@naveenann naveenann Jul 4, 2023

Choose a reason for hiding this comment

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

ahh ok. without the size field.

@naveenann naveenann marked this pull request as ready for review July 4, 2023 10:52
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Merging #2111 (2d9a82c) into main (3fef052) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff            @@
##             main    #2111    +/-   ##
========================================
  Coverage   94.39%   94.39%            
========================================
  Files         321      321            
  Lines       60650    60797   +147     
========================================
+ Hits        57248    57391   +143     
- Misses       3402     3406     +4     
Impacted Files Coverage Δ
src/collector/top_score_collector.rs 98.04% <100.00%> (+0.17%) ⬆️

... and 15 files with indirect coverage changes

@@ -157,8 +171,13 @@ impl CustomScorer<u64> for ScorerByField {
sort_column_opt.ok_or_else(|| FastFieldNotAvailableError {
field_name: self.field.clone(),
})?;
let mut value = 0u64;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let mut value = 0u64;
let mut default_value = 0u64;

@naveenann naveenann requested a review from PSeitz July 5, 2023 07:33
Copy link
Contributor

@PSeitz PSeitz left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@PSeitz PSeitz merged commit 67bdf3f into quickwit-oss:main Jul 6, 2023
4 checks passed
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.

None yet

3 participants