acts_as_xapian numeric range searching

I recently implemented Xapian and the acts_as_xapian plugin into my rails project. However, I ran into the ‘Unknown range’ operation error.

By applying the patches listed here and here, that solves the problem for me.

Please note that the changes have to be made to the ‘acts_as_xapian’ lib file within the vendors directory and then rebuild your index and restart your web app before seeing the changes take effect.

Also, if you are performing a numeric range search don’t prefix the values with ‘:’

For example, searching for ‘prices0..100′ is a numeric range search while ‘prices:low’ is a term search for specific attribute of that model.

 

2 Responses to “acts_as_xapian numeric range searching”

  1. [...] the original post: 29 Steps | Ruby, Rails, Web 2.0 development and design | UK | Blog By admin | category: rails ruby | tags: alerts, development, editorial-team, global, [...]

  2. SHARRON says:

    I’ve been looking all over for this!

    Thanks.