You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by Game Now <ga...@gmail.com> on 2005/11/14 04:39:32 UTC

Question of Range search

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

Re: Question of Range search

Posted by Doug Cutting <cu...@nutch.org>.
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