Skip to content

No error when trying to use native w/ Jaccard similarity #9

@joshdevins

Description

@joshdevins

Turned native: true, and Recommendify would fail silently w/ Jaccard similarity instead of throwing some error when native extensions are failing. (if not built, I do get a proper error message: recommendify_native not found - you need to run rake build_native first)

Note that matrices are built but the final similarities hash in Redis is empty:

redis 127.0.0.1:6379[5]> hgetall recommendify:users:ccmatrix

  1. "989:992"
  2. "1"
  3. "989:994"
  4. "1"
  5. "992:994"
  6. "2"
  7. "990:992"
  8. "1"
  9. "990:994"
  10. "1"
  11. "991:993"
  12. "1"
  13. "991:994"
  14. "1"
  15. "993:994"
  16. "1"
    redis 127.0.0.1:6379[5]> hgetall recommendify:similarities
  17. "989"
  18. ""
  19. "992"
  20. ""
  21. "994"
  22. ""
  23. "990"
  24. ""
  25. "991"
  26. ""
  27. "993"
  28. ""

Some debug output added shows exit output as: item count is zero or one <-- this error should be thrown

Further debugging shows that unless you use DB 0 in Redis from Ruby, the native code will fail since it uses the default DB. Will open a new issue or fork for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions