neoid-gem / neoid

Extend Ruby on Rails ActiveRecord with Neo4j nodes. Keep RDBMS and utilize the power of Neo4j queries.
MIT License
171 stars 33 forks source link

Improve search functionality #20

Closed rubinsh closed 11 years ago

rubinsh commented 11 years ago

Hi Elad,

I've added an option called [:match_type] to the Neoid.search method. It allows the user in fulltext search to do an "OR" query between the words separated by spaces. This allows the user to do queries such as: Job.neo_search("java c#",:match_type => "OR") and get results that have either the words java or c# in them (or both).

On my DB, when doing: Job.neo_search("java c#",:match_type => "OR") - I get a lot of results, and when doing the default behavior ("AND") - I get no results.

I think that this is a useful option.

Shai

elado commented 11 years ago

Thanks. Can you please add a test for that?

rubinsh commented 11 years ago

Done.

rubinsh commented 11 years ago

Oops - closed this by mistake. You can review and accept request now.