borowiak / pwa-technologies

Automatically exported from code.google.com/p/pwa-technologies
0 stars 0 forks source link

Date restriction OpenSearchServlet only if both start and end date specified #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The date restriction parameters "dtstart" and "dtend" only work if both are 
present.

If neither "dtstart" and "dtend" are set, no restriction is applied.
If only "dtstart" is set, no date restriction occur. It shouldn't return any 
result older that "dtstart"
If only "dtend" is set, no date restriction occur. It shouldn't return any 
result newer that "dtend"
If both "dtstart" and "dtend" are set, date restriction is correctly applied.

This issue is caused by the if condition in 
http://code.google.com/p/pwa-technologies/source/browse/trunk/PwaArchive-access/
projects/nutchwax/nutchwax-thirdparty/nutch/src/java/org/apache/nutch/searcher/O
penSearchServlet.java#171

[1] http://arquivo.pt/opensearch?query=test
[2] http://arquivo.pt/opensearch?query=test&dtstart=2004-09-24T00:00:00Z
[3] http://arquivo.pt/opensearch?query=test&dtend=2007-09-24T00:00:00Z
[4] 
http://arquivo.pt/opensearch?query=test&dtstart=2004-09-24T00:00:00Z&dtend=2007-
09-24T00:00:00Z

Original issue reported on code.google.com by devel.da...@vcruz.net on 27 Oct 2011 at 4:07