Douglas F Shearer

Acts_As_indexed v0.2 Released


My Acts_as_indexed plugin has been updated to version 0.2.0.

New in this version is:

  • Major performance improvements.
  • Segmentation of the index can now be tuned.
 

Comments


Gravatar

Matt

May 09 2008 01:10

Hi,

Excellent plugin -- makes searching as easy as it should be. Using it with Oracle was causing problems, however, since it is limited to 1000 elements in an 'in' clause (e.g. 'id in (?)', part_query).

Tried to break it down into smaller chunks (e.g. 500), but it was returning more and more results with each pass (e.g. first pass would return the expected 500 results, next pass would return 1000, then 1500 etc).

After much scouring through my own code, I noticed that the way acts_as_indexed handled offset and limit was causing probs:

acts_as_indexed.rb:137 is

limit = find_options.include?(:limit) ? find_options[:limit] + offset : @query_cache[query].size

should be

limit = find_options[:limit] || @query_cache[query].size

since ruby implements slice as slice(start, length) rather than slice(start, finish). Fixed that in my own copy -- thought you would like to know.

Otherwise, thanks for the awesome plugin!

Add Your Comments


Commenting is closed for this entry.

 

You Are Here


Douglas F Shearer

This is the homepage of Douglas F Shearer, a software developer and mountainbike racer. More…

Hire Me!


I'm available for hire. Ruby, Java and PHP work, both remotely (Worldwide) and locally (Scotland). Find out more or email me.

Flickr Latest


Stay Informed


What is RSS?

Categories


  1. Bike (93)
  2. Coding (85)
  3. Other (46)

Top Tags