Question of Range search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question of Range search

Game Now
Hi All,

I wanna Nutch help me do a range search, such as price:{1000 TO 2000}
or date[20050101 TO 20051111].

But org.apache.nutch.searcher.Query#parse() method parse them to
"price 1000 2000" and "date 20050101 20051111" when i pass them to the
method.

Anybody can help me complete a range search in Nutch?

Thank you!
-GameNow
Reply | Threaded
Open this post in threaded view
|

Re: Question of Range search

Doug Cutting-2
Game Now wrote:

> Hi All,
>
> I wanna Nutch help me do a range search, such as price:{1000 TO 2000}
> or date[20050101 TO 20051111].
>
> But org.apache.nutch.searcher.Query#parse() method parse them to
> "price 1000 2000" and "date 20050101 20051111" when i pass them to the
> method.
>
> Anybody can help me complete a range search in Nutch?

You need to implement a query filter plugin.  See, for example:

http://svn.apache.org/viewcvs.cgi/lucene/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java?rev=179640&view=markup

Doug