Skip to content

Commit

Permalink
fix: escape colons in term query (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Jul 11, 2024
1 parent 0d0e5af commit d9aef53
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/server/run/hpo_terms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,9 @@ async fn handle(
query_parser.set_field_fuzzy(field_synonym, true, 1, true);
query_parser
};
let index_query = query_parser.parse_query(name).map_err(|e| {
eprintln!("{e}");
CustomError::new(anyhow::anyhow!("Error parsing query: {}", e))
})?;
let index_query = query_parser
.parse_query(&format!("\"{name}\""))
.map_err(|e| CustomError::new(anyhow::anyhow!("Error parsing query: {}", e)))?;
let top_docs = searcher
.search(
&index_query,
Expand Down

0 comments on commit d9aef53

Please sign in to comment.