Using fuzzily with more than one field RAILS -


rails 4.2 ruby 2.1 fuzzily (0.3.3) 

i using fuzzily gem searches , it's working. in controller, have this:

@notes = note.find_by_fuzzy_description("%#{item}%") 

the notes table has following fields:

user_id description contents 

what return fields user_id = 5 (for example). idea how fuzzily?

as stated in github open issues it's well-known requested feature not resolved. can try test note.where(user_id: user_id).find_by_fuzzy_description("%#{item}%") , if works correctly, doubt does.

as workaround can try fuzzy search big limit , select results belongs user , apply standart limit. slower, wouldn't recommend use if have many users.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -