Skip to content

Commit

Permalink
chore: drop debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
zwpaper committed Nov 21, 2024
1 parent b0cc3fa commit 0565f2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
13 changes: 2 additions & 11 deletions crates/tabby-index/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,19 +259,10 @@ impl Indexer {
pub fn has_failed_chunks(&self, id: &str) -> bool {
let schema = IndexSchema::instance();
let query = schema.doc_has_failed_chunks(&self.corpus, id);
// let Ok(docs) = self.searcher.search(&query, &TopDocs::with_limit(1)) else {
// return false;
// };
let docs = match self.searcher.search(&query, &TopDocs::with_limit(1)) {
Ok(docs) => docs,
Err(e) => {
println!("error: {:?}", e);
return false;
}
let Ok(docs) = self.searcher.search(&query, &TopDocs::with_limit(1)) else {
return false;
};

println!("docs: {:?}", docs);

!docs.is_empty()
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/tabby-index/src/structured_doc_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ mod structured_doc_tests {
indexer.commit();

let validator = Indexer::new(corpus::STRUCTURED_DOC);
// Wait for up to 30s for the document to be indexed.
for _ in 0..30 {
// Wait for up to 60s for the document to be indexed.
for _ in 0..60 {
if validator.is_indexed(id) {
break;
}
Expand Down Expand Up @@ -102,8 +102,8 @@ mod structured_doc_tests {
indexer.commit();

let validator = Indexer::new(corpus::STRUCTURED_DOC);
// Wait for up to 30s for the document to be indexed.
for _ in 0..30 {
// Wait for up to 60s for the document to be indexed.
for _ in 0..60 {
if validator.is_indexed(id) {
break;
}
Expand Down

0 comments on commit 0565f2d

Please sign in to comment.