Files
tantivy/src
Adam Reichold 083aec5125 Provide StoreReader::enumerate to simplify creation of secondary indexes
For secondary indexes, it is often necessary to read all documents, compute
some function on them and associated the result with a document ID.

Currently, this requires something like

```rust
let reader = segment.get_store_reader(1)?;

for doc_id in segment.doc_ids_alive() {
    let doc = reader.get(doc_id)?;

    // Use doc and doc_id here ...
}
```

which can be simplified to

```rust
let reader = segment.get_store_reader(1)?;

for res in reader.enumerate() {
    let (doc_id, doc) = res?;

    // Use doc and doc_id here ...
}
```

using the method proposed here.

(I added a new method instead of modifying `StoreReader::iter` to make the
change backwards compatible, i.e. possible to include in a point release.)
2024-05-23 08:30:30 +02:00
..
2024-05-22 10:10:55 +09:00
2024-04-09 07:54:44 +02:00
2024-05-21 10:16:08 +02:00
2024-05-09 06:14:42 +02:00
2024-05-07 09:59:41 +02:00
2024-05-21 10:16:08 +02:00
2024-05-21 10:16:08 +02:00
2024-05-21 10:16:08 +02:00