mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-25 19:45:05 +08:00
Revert "feat: Introducing the Matches as_matches method"
This reverts commit ef7ba96d4a
.
This commit is contained in:
parent
2cc5fbde1a
commit
f32a59720d
@ -116,7 +116,7 @@ fn main() -> Result<(), Box<Error>> {
|
||||
};
|
||||
|
||||
print!("{}: ", name);
|
||||
let areas = create_highlight_areas(&text, doc.matches.as_matches(), attr);
|
||||
let areas = create_highlight_areas(&text, &doc.matches, attr);
|
||||
display_highlights(&text, &areas)?;
|
||||
println!();
|
||||
}
|
||||
@ -125,7 +125,7 @@ fn main() -> Result<(), Box<Error>> {
|
||||
}
|
||||
|
||||
let mut matching_attributes = HashSet::new();
|
||||
for _match in doc.matches.as_matches() {
|
||||
for _match in doc.matches {
|
||||
let attr = SchemaAttr::new(_match.attribute.attribute());
|
||||
let name = schema.attribute_name(attr);
|
||||
matching_attributes.insert(name);
|
||||
|
@ -71,10 +71,6 @@ impl Matches {
|
||||
windows: self.slices.windows(2),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_matches(&self) -> &[Match] {
|
||||
&self.matches
|
||||
}
|
||||
}
|
||||
|
||||
pub struct QueryIndexGroups<'a, 'b> {
|
||||
|
Loading…
Reference in New Issue
Block a user