1. Matt Chaput
  2. whoosh


Matt Chaput  committed ad25aae

Changed retokenizing code to include positions as well as chars,
since this might be useful for custom classes, e.g. scorers.

  • Participants
  • Parent commits 0e0d6b6
  • Branches default

Comments (0)

Files changed (1)

File src/whoosh/highlight.py

View file
  • Ignore whitespace
             # Retokenize the text
             analyzer = results.searcher.schema[fieldname].analyzer
-            tokens = analyzer(text, chars=True, mode="query",
+            tokens = analyzer(text, positions=True, chars=True, mode="query",
             # Set Token.matched attribute for tokens that match a query term
             tokens = set_matched_filter(tokens, words)