Range search syntax with xapian?

hey ,

am looking for xapian syntax to do a range search

in my code i have

class Table < AR
acts_as_xapian :texts => [:title],
:values => [[ :left, 0, “left”, :number
],[ :right, 1, “right”, :number ] ],
:terms => [ [: left, ‘L’,
“left”],[:right, ‘R’, “right”]]
end

and when a launch the following search in console i have an execption

ActsAsXapian::Search.new([Table], ‘left:1…100 AND right:30…200’,
:limit => 100000).result

exception :

RuntimeError: QueryParserError: Unknown range operation
from
/Users/mecharek/tm/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb:367:in
parse_query' from /Users/mecharek/tm/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb:367:ininitialize’
from (irb):3:in `new’

i need help please

thx

Hi,

It seems like it’s a known defect :
http://overbryd.lighthouseapp.com/projects/23868-acts_as_xapian/tickets/5-fix-value-range-searching

Mecharek M. wrote:

hey ,

am looking for xapian syntax to do a range search

in my code i have

class Table < AR
acts_as_xapian :texts => [:title],
:values => [[ :left, 0, “left”, :number
],[ :right, 1, “right”, :number ] ],
:terms => [ [: left, ‘L’,
“left”],[:right, ‘R’, “right”]]
end

and when a launch the following search in console i have an execption

ActsAsXapian::Search.new([Table], ‘left:1…100 AND right:30…200’,
:limit => 100000).result

exception :

RuntimeError: QueryParserError: Unknown range operation
from
/Users/mecharek/tm/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb:367:in
parse_query' from /Users/mecharek/tm/vendor/plugins/acts_as_xapian/lib/acts_as_xapian.rb:367:in initialize’
from (irb):3:in `new’

i need help please

thx