Browse Source

BUGFIX put indexed text fields in default schema

develop
Paul Masurel 7 years ago
parent
commit
a291345e5b
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/commands/serve.rs

+ 4
- 2
src/commands/serve.rs View File

@@ -83,7 +83,9 @@ impl IndexServer {
.filter(
|&(_, ref field_entry)| {
match *field_entry.field_type() {
FieldType::Str(_) => true,
FieldType::Str(ref text_field_options) => {
text_field_options.get_indexing_options().is_indexed()
},
FieldType::U32(_) => false
}
}
@@ -105,7 +107,7 @@ impl IndexServer {
}
fn search(&self, q: String, num_hits: usize, explain: bool) -> tantivy::Result<Serp> {
let query = self.query_parser.parse_query(&q).unwrap();
let query = self.query_parser.parse_query(&q).expect("Parsing the query failed");
let searcher = self.index.searcher();
let mut count_collector = CountCollector::default();
let mut top_collector = TopCollector::with_limit(num_hits);


Loading…
Cancel
Save