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

Fix bug when indexing a document with empty fields #31

Merged
merged 2 commits into from
May 17, 2013
Merged

Conversation

olivernn
Copy link
Owner

Updates to #28 which fixes #27.

This makes sure that documents with an empty field do not end up getting a NaN score when searching.

If a field has no tokens it should not contribute to the tf for that token, before it was and 0 / 0 leads to a NaN.

Gambhiro and others added 2 commits May 16, 2013 08:39
was causing issues when adding a document with an empty field, 0 / 0 would give a NaN which would end up as the tf, and then as the documents score against a query
olivernn added a commit that referenced this pull request May 17, 2013
Fix bug when indexing a document with empty fields
@olivernn olivernn merged commit 42d2fe2 into master May 17, 2013
@olivernn olivernn deleted the pr/28 branch May 17, 2013 09:50
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

Successfully merging this pull request may close these issues.

TypeError: Cannot call method 'replace' of null
1 participant