Skip to content

web search done right

use description instead of dmoz_description in optic as dmoz_description isn't generally populated and not supported by PatternQuery

Mikkel Denker7ea70c4df773
diff --git a/crates/core/src/query/optic.rs b/crates/core/src/query/optic.rs
index 3b607dd6..af597b04 100644
--- a/crates/core/src/query/optic.rs
+++ b/crates/core/src/query/optic.rs
@@ -208,27 +208,15 @@ impl AsTantivyQuery for Matching {
)),
1.0,
)),
- MatchLocation::Description => UnionQuery::from(vec![
- Box::new(ConstQuery::new(
- Box::new(PatternQuery::new(
- self.pattern.clone(),
- text_field::Description.into(),
- schema,
- columnfield_reader.clone(),
- )),
- 1.0,
- )) as Box<dyn tantivy::query::Query>,
- Box::new(ConstQuery::new(
- Box::new(PatternQuery::new(
- self.pattern.clone(),
- text_field::DmozDescription.into(),
- schema,
- columnfield_reader.clone(),
- )),
- 1.0,
- )) as Box<dyn tantivy::query::Query>,
- ])
- .box_clone(),
+ MatchLocation::Description => Box::new(ConstQuery::new(
+ Box::new(PatternQuery::new(
+ self.pattern.clone(),
+ text_field::Description.into(),
+ schema,
+ columnfield_reader.clone(),
+ )),
+ 1.0,
+ )) as Box<dyn tantivy::query::Query>,
MatchLocation::Content => Box::new(ConstQuery::new(
Box::new(PatternQuery::new(
self.pattern.clone(),