Skip to content

Commit

Permalink
bugfix tantivy query syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
c7nw3r committed Sep 6, 2023
1 parent 76eb6de commit 16a11ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion localsearch/searcher/tantivy_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _canonicalize(self, text: str):
text = remove_punctuation(text)
text = remove_stopwords(text, self.config.lang)
text = lemmatize(text, self.config.lang)
text = text.replace("-", " ") # leads to tantivy syntax error
text = '"' + text + '"'
return text

def search_by_source(self, source: str, n: Optional[int] = None) -> List[Document]:
Expand Down

0 comments on commit 16a11ea

Please sign in to comment.