mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-09 02:22:54 +00:00
Use logging.
This commit is contained in:
30
Cargo.toml
30
Cargo.toml
@@ -17,30 +17,30 @@ keywords = ["search", "information", "retrieval"]
|
||||
[dependencies]
|
||||
byteorder = "0.4"
|
||||
memmap = "0.2"
|
||||
lazy_static = "0.1.15"
|
||||
lazy_static = "0.1"
|
||||
regex = "0.1"
|
||||
fst = "0.1.34"
|
||||
fst = "0.1"
|
||||
atomicwrites = "0.0.14"
|
||||
tempfile = "2.0.0"
|
||||
rustc-serialize = "0.3.16"
|
||||
log = "0.3.5"
|
||||
combine = "1.3.0"
|
||||
tempdir = "0.3.4"
|
||||
bincode = "0.4.0"
|
||||
tempfile = "2.0"
|
||||
rustc-serialize = "0.3"
|
||||
log = "0.3"
|
||||
combine = "1.3"
|
||||
tempdir = "0.3"
|
||||
bincode = "0.4"
|
||||
libc = "0.2.6"
|
||||
num_cpus = "0.2"
|
||||
itertools = "0.4.16"
|
||||
lz4 = "1.13.131"
|
||||
time = "0.1.34"
|
||||
itertools = "0.4"
|
||||
lz4 = "1.13"
|
||||
time = "0.1"
|
||||
uuid = "0.1"
|
||||
chan = "0.1.18"
|
||||
crossbeam = "0.2.10"
|
||||
chan = "0.1"
|
||||
crossbeam = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.3.13"
|
||||
rand = "0.3"
|
||||
|
||||
[build-dependencies]
|
||||
gcc = "0.3.24"
|
||||
gcc = "0.3"
|
||||
|
||||
# [profile.release]
|
||||
# debug = true
|
||||
|
||||
@@ -123,7 +123,7 @@ impl InnerHeap {
|
||||
}
|
||||
else {
|
||||
if self.next_heap.is_none() {
|
||||
println!("exceed heap size");
|
||||
warn!("Exceeded heap size. The margin was apparently unsufficient. The segment will be committed right after indexing this very last document.");
|
||||
self.next_heap = Some(Box::new(InnerHeap::with_capacity(self.buffer_len as usize)));
|
||||
}
|
||||
self.next_heap.as_mut().unwrap().allocate(num_bytes) + self.buffer_len
|
||||
|
||||
@@ -51,8 +51,7 @@ fn index_documents(heap: &mut Heap,
|
||||
for doc in document_iterator {
|
||||
try!(segment_writer.add_document(&doc, &schema));
|
||||
if segment_writer.is_buffer_full() {
|
||||
println!("no more space committing.");
|
||||
println!("seg max doc {}", segment_writer.max_doc());
|
||||
info!("Buffer limit reached, flushing segment with maxdoc={}.", segment_writer.max_doc());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ Tantivy is a search engine library.
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[macro_use]
|
||||
extern crate fst;
|
||||
extern crate byteorder;
|
||||
@@ -35,6 +38,8 @@ extern crate itertools;
|
||||
extern crate chan;
|
||||
extern crate crossbeam;
|
||||
|
||||
|
||||
|
||||
#[cfg(test)] extern crate test;
|
||||
#[cfg(test)] extern crate rand;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user