-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
improve document docs #2359
improve document docs #2359
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
use crate::indexer::index_writer::MEMORY_BUDGET_NUM_BYTES_MIN; | ||
use crate::schema::*; | ||
#[allow(deprecated)] | ||
use crate::{doc, schema, Index, IndexSettings, IndexSortByField, IndexWriter, Order, Searcher}; | ||
|
||
fn check_index_content(searcher: &Searcher, vals: &[u64]) -> crate::Result<()> { | ||
|
@@ -80,9 +81,9 @@ | |
|
||
let mut index_builder = Index::builder().schema(schema); | ||
index_builder = index_builder.settings(IndexSettings { | ||
sort_by_field: Some(IndexSortByField { | ||
Check warning on line 84 in src/functional_test.rs GitHub Actions / clippyuse of deprecated struct `index::index_meta::IndexSortByField`: We plan to remove index sorting in `0.23`. If you need index sorting, please comment on the related issue https://github.com/quickwit-oss/tantivy/issues/2352 and explain your use case.
|
||
field: "id".to_string(), | ||
Check warning on line 85 in src/functional_test.rs GitHub Actions / clippyuse of deprecated field `index::index_meta::IndexSortByField::field`: We plan to remove index sorting in `0.23`. If you need index sorting, please comment on the related issue https://github.com/quickwit-oss/tantivy/issues/2352 and explain your use case.
|
||
order: Order::Desc, | ||
Check warning on line 86 in src/functional_test.rs GitHub Actions / clippyuse of deprecated field `index::index_meta::IndexSortByField::order`: We plan to remove index sorting in `0.23`. If you need index sorting, please comment on the related issue https://github.com/quickwit-oss/tantivy/issues/2352 and explain your use case.
|
||
}), | ||
..Default::default() | ||
}); | ||
|
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 think it would be helpful to explain what these bring to the table, i.e. how the three built-in options compare, e.g.
BTreeMap
provides associative access but ordered whereHashMap
has faster associative access, but neither supports multiple values per field if I understand this correctly.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.
Yeah, not sure why we have that actually. Seems too niche
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 wrote the original doc originally IIRC, but the motive for the impl was because a lot of people have situations where they have single-value fields and just want to deserialize and serialize the data to and from JSON as is without needing to convert the by-default multi-value fields into single-value fields. So this was a utility for that.