# Range search syntax with xapian?

**URL:** <https://www.ruby-forum.com/t/range-search-syntax-with-xapian/178052>\
**Category:** Rails\
**Created:** [October 28, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/range-search-syntax-with-xapian/178052 "2009-10-28T16:07:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![massi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://www.ruby-forum.com/u/massi)\
**Post date:** [October 28, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/range-search-syntax-with-xapian/178052/1 "2009-10-28T16:07:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![massi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://www.ruby-forum.com/u/massi)\
**Post date:** [October 30, 2009, 6:53am UTC](https://www.ruby-forum.com/t/range-search-syntax-with-xapian/178052/2 "2009-10-30T06:53:32Z")

</div>

Hi,

It seems like it’s a known defect :  
[http://overbryd.lighthouseapp.com/projects/23868-acts\_as\_xapian/tickets/5-fix-value-range-searching](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
