Author: cutting
Date: Thu May 5 14:42:59 2005
New Revision: 168429
URL: http://svn.apache.org/viewcvs?rev=168429&view=rev
Log:
Throw an exception for syntax errors. Also trigger filterization by
setting boost=0.
Modified:
incubator/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java
Modified:
incubator/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java
URL:
http://svn.apache.org/viewcvs/incubator/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java?rev=168429&r1=168428&r2=168429&view=diff
==============================================================================
---
incubator/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java
(original)
+++
incubator/nutch/trunk/src/plugin/query-more/src/java/org/apache/nutch/searcher/more/DateQueryFilter.java
Thu May 5 14:42:59 2005
@@ -65,9 +65,7 @@
Matcher matcher = pattern.matcher(x);
if (!matcher.matches()) {
- LOG.warning("Wrong query syntax for field "+FIELD_NAME+":"+x);
- // or just ignore silently?
- return output;
+ throw new QueryException("Wrong query syntax "+FIELD_NAME+":"+x);
}
// do it as lucene RangeQuery
@@ -76,6 +74,8 @@
// inclusive
RangeQuery rangeQuery = new RangeQuery(xLower, xUpper, true);
+
+ rangeQuery.setBoost(0.0f); // trigger filterization
output.add(rangeQuery, c.isRequired(), c.isProhibited());
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r
_______________________________________________
Nutch-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-cvs