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.

Tags

, , , , , .

Related Posts

September 4th 2007 14:33 | comments (1)
 

Comments


Gravatar

Matt

May 9th 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


(Required)

Your email address to get your Gravatar. Address itself is not shown.

(Include the http://)

(Required)

 

You Are Here


Douglas F Shearer

This is the homepage of Douglas F Shearer, a software developer and mountainbike racer. Find out more at the About page.

Gallery Latest


Side on Chips on crown Front on chip2 chip1 img67

Stay Informed


What is RSS?

Top Tags