Every repository with this icon (
Every repository with this icon (
| Fork of look/acts_as_solr | |
| Description: | This plugin adds full text search capabilities and many other nifty features from Apache‘s Solr to any Rails model. I'm currently rearranging the test suite to include a real unit test suite, and adding a few features I need myself. edit |
-
0 comments Created 8 months ago by mattmattBuild a better unit test suite for the refactoring branchtestsxNow that most of the class has been moved into classes, it's time for a better unit test suite for them.
Comments
-
Comments
I'm using Lucene's Fuzzy Search capabilities which is tolerant to mispellings. What do you exactly mean by spellchecking?
Solr has support to "spellcheck" search terms, as in: Here's a search term Solr, please have a look if you have something similar in your index, and maybe this term has been misspelled by the user.
Yes, I know. I use this feature as following:
Model.find_by_solr "#{term} OR #{term}~"
So I wonder why you would like to add support as it is included already.
Because in larger indexes, not doing a fuzzy search can be significantly faster, and it's sometimes not appropriate to do wild searches with fuzzy search. Search suggestions sometimes have more expressiveness. The support for it is there in Solr, so it'd only be feasable to offer it in acts_as_solr as well.
-
Obviously this is just a minor change, but there should be a way to specify a core in the configuration.
Comments
-
1 comment Created 8 months ago by mattmattAdd a hook for asynchronous index updates.featurexNot sure how it could look though, but maybe there's a simple solution that could ease the pain.
Comments
-
in lib/solr/xml.rb on line 21
raise "acts_as_solr requires libxml-ruby 0.7 or greater" unless XML::Node.public_instance_methods.include?("attributes") throws a RuntimeError
and then line 38
rescue LoadError => e # If we can't load either rubygems or libxml-ruby
- It seems that if libxml-ruby greater than 0.7 it should skip the section where it modifies XML::Node instead of throwing an error.
- Why not check what version of libxml-ruby instead of seeing if an instance method exists?
If all that is intended here is to skip modifying the XML::Node class when libxml-ruby is greater than 0.7 then I can make a patch to do this instead of throwing an error if that is ok
Comments
- It seems that if libxml-ruby greater than 0.7 it should skip the section where it modifies XML::Node instead of throwing an error.
-
honkster has done some good groundwork on that front. Seems like a good basis to work on.
Comments
-
Following a commit from ox... to jbasdf ( the version that seems the latest ) the rake file was generating errors.
This seems to be due to a call to 'if windows' rather than probably 'unless windows' which works fine on a mac dev + ubuntuu deployment machine... Could do with a retest on a windows box.
At some pt will jbasdf merge to mattmatt
(Fraid Git terminology is still new, so unsure if this is correct procedure - but seems to be the main issues list for acts_as_solr )Comments
-
When a query contains a date literal (for instance: 2008-10-17T00:00:00Z) the colons are transformes assuming that they specify a search field.
The date sent to Solr is then: 2008-10-17T00_t:00_t:00Z
Escaping should not be done in this case.
Comments
Workaround: replace line 73 on parser_methods.rb
Original: query = "(#{query.gsub(/ : /,"_t:")}) #{models}" New: query = "(#{query.gsub(/( +|([^0-9])): */, "\2_t:")}) #{models}"This passes the full test suite, although it will cause problems with field names ending with a number.











