[GeoNetwork-users] xml.search with dateFrom and dateTo

Hello list,

If I type in my browser :
http://172.57.57.57:8080/geonetwork/srv/en/xml.search? I get a list of 11
results, with elements <createDate>2010-10-15T16:23:03</createDate> and
<changeDate>2010-10-15T16:23:03</changeDate>, among others.

If I type
http://172.57.57.57:8080/geonetwork/srv/en/xml.search?dateFrom=2010-10-15T01:00:00&dateTo=2010-10-16T01:00:00
or whatever date range that should include results, I get :
<response from="0" to="0" selected="0">
<summary count="0" type="local" hitsusedforsummary="0">
<keywords/>
</summary>
</response>
Same results if I try with only dates and no times :
http://172.57.57.57:8080/geonetwork/srv/en/xml.search?dateFrom=2010-10-15&dateTo=2010-10-16

Any idea what I'm doing wrong ?

It's GeoNetwork 2.6.0

Alain
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5681524.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

The same problem applies if I use the advanced search on GeoNetwork's web
interface. With "anytime", it finds all results, with any date range, no
results at all.

I inspected lucene's index with luke and noticed the _changeDate field is
present and filled in with the expected values.

Any idea ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686091.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

The same problem applies if I use the advanced search on GeoNetwork's web
interface.
http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded?dateFrom=2009-10-01&dateTo=2010-10-31
: no results
http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded : all
results available

I inspected lucene's index with luke and noticed the _changeDate field is
present and filled in with the expected values.

Any idea ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686121.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi

I tested with 2.6.0 version and branch 2.6.X code and seem working ok for
me. When using the gui the dates include time information:

dateFrom 2010-10-28T00:00:00
dateTo 2010-10-30T00:00:00

Not sure why you get the dates without time in the gui service, but this can
be the problem, to get no results.

Also similar results for me using xml.search service.

Maybe someone can try also to check.

Regards,
Jose García

On Fri, Oct 29, 2010 at 1:34 PM, acangi <aca@anonymised.com> wrote:

The same problem applies if I use the advanced search on GeoNetwork's web
interface.

http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded?dateFrom=2009-10-01&dateTo=2010-10-31
: no results
http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded : all
results available

I inspected lucene's index with luke and noticed the _changeDate field is
present and filled in with the expected values.

Any idea ?
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686121.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America
contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in
marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

Thanks for your reply.

I removed the times to make the request more clear, along with the other
search parameters.

I tried with times to exclude this possibility :

http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded?dateFrom=2009-10-01T00:00:00&dateTo=2010-10-31T00:00:00
: no results
http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded : all
results

I didn't change anything to the code of the app, so I don't understand why
it doesn't work here but well when you try it.

Write permissions needed on some folder ? Is some temporary file written
somewhere ?

Alain
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686434.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi

No file permissions required as I know.

I tried with the sample metadata, but no extensive tests performed. Did some
date range queries, checking the change date in the results returned to
check that was correct.

If in log4j.cfg file you set search to DEBUG, you should get in
geonetwork.log the lucene query that is using GeoNetwork, so you can try
with Luke to verify if any result. Maybe also post here to verify with my
query.

Regards,
Jose García

On Fri, Oct 29, 2010 at 3:23 PM, acangi <aca@anonymised.com> wrote:

Thanks for your reply.

I removed the times to make the request more clear, along with the other
search parameters.

I tried with times to exclude this possibility :

http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded?dateFrom=2009-10-01T00:00:00&dateTo=2010-10-31T00:00:00
: no results
http://172.57.57.57:8080/geonetwork/srv/en/main.search.embedded : all
results

I didn't change anything to the code of the app, so I don't understand why
it doesn't work here but well when you try it.

Write permissions needed on some folder ? Is some temporary file written
somewhere ?

Alain
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686434.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America
contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in
marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

I have to leave work now, but I'll try this on wednesday. Next step is
finding luke's query syntax.

Thanks for the hint :slight_smile:
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5686670.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hello,

I found out that the lucene query wasn't the <request> ... </request> but
the small line at the end.

In my logs, I read :
+(_op0:1) +_isTemplate:n +changeDate:[2005-11-01T07:24:00.000Z TO
2010-11-30T07:24:00.000Z]
This query in Luke returns indeed 0 results. If I add an underscore before
changeDate, it seems to work OK in Luke :
+(_op0:1) +_isTemplate:n +_changeDate:[2005-11-01T07:24:00.000Z TO
2010-11-30T07:24:00.000Z]

Would it be OK if I add an underscore in
/geonetwork/trunk/web/src/main/java/org/fao/geonet/kernel/search/LuceneIndexField.java
at the line
public static final String CHANGE_DATE = "changeDate";
or would it rather screw it up ?

Alain

The reason why I'm encountering this and not you is maybe because I'm using
Tomcat 7 ?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/xml-search-with-dateFrom-and-dateTo-tp5681524p5700409.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.