mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-04 08:12:54 +00:00
Compare commits
1 Commits
0.25.0
...
update_exa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5a716e827 |
@@ -19,13 +19,14 @@ use tantivy::{doc, Index, IndexWriter, ReloadPolicy};
|
|||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
|
|
||||||
fn main() -> tantivy::Result<()> {
|
fn main() -> tantivy::Result<()> {
|
||||||
// Let's create a temporary directory for the
|
// Normally you would use `MMapDirectory` instead to persist data on disk.
|
||||||
// sake of this example
|
// https://docs.rs/tantivy/latest/tantivy/directory/struct.MmapDirectory.html
|
||||||
|
// But for this example, we will use a temporary directory `TempDir`.
|
||||||
let index_path = TempDir::new()?;
|
let index_path = TempDir::new()?;
|
||||||
|
|
||||||
// # Defining the schema
|
// # Defining the schema
|
||||||
//
|
//
|
||||||
// The Tantivy index requires a very strict schema.
|
// The Tantivy index requires a schema.
|
||||||
// The schema declares which fields are in the index,
|
// The schema declares which fields are in the index,
|
||||||
// and for each field, its type and "the way it should
|
// and for each field, its type and "the way it should
|
||||||
// be indexed".
|
// be indexed".
|
||||||
|
|||||||
Reference in New Issue
Block a user