Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passages are displayed improperly #27

Open
real-alexei opened this issue May 3, 2011 · 0 comments
Open

Passages are displayed improperly #27

real-alexei opened this issue May 3, 2011 · 0 comments

Comments

@real-alexei
Copy link

Currently the words variable for BuildExcerpts is built from words returned by Query command. These words are already stemmed and accompanied with some statistical information like docs and hits. Highlighting fails for some queries.

For example try recovery keyword, it's not highlighted since Query returns the stemmed version (recoveri) (I think this is the result of the soundex stemmer).

Anyways when you use a query string as a words variable for BuildExcerpts all's fine with highlighting. BuildExcerpts do the stemming and we don't use statistics on highlighting so I don't see the problem of using the initial query string for words.

I think this is subject to fix the line 569 of djangosphinx/models.py:

words = ' '.join([w['word'] for w in results['words']])

Replace this to:

words = self._query

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant