[GeoNetwork-devel] Full text search via z39.50

Hi:

I am trying to do a full text search to geonetwork 2.1 using
z39.50 library. If I use a field to search everything works ok
but if I try to do a full text search without specifying fields
I always get 0 matches. I have tried with different clients
yaz, zsearch, etc. with the same results.

Is this a bug, or I am missing something?

Best regards

Godofredo Contreras


Peek-a-boo FREE Tricks & Treats for You! Get 'em!

In Z39.50 search, you have to specify at least one keyword

Cheers,
Andrea

Hi:

I am trying to do a full text search to geonetwork 2.1 using
z39.50 library. If I use a field to search everything works ok
but if I try to do a full text search without specifying fields
I always get 0 matches. I have tried with different clients
yaz, zsearch, etc. with the same results.

Is this a bug, or I am missing something?

Best regards

Godofredo Contreras

_________________________________________________________________
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us

Andrea Carboni wrote:

In Z39.50 search, you have to specify at least one keyword

I've been doing some testing with the v2.1 distribution and with the
updated one from subversion.

I used Gast to create one set of records, then imported 5 FGDC metadata
records for which I know the search results (these are the 5 records
included with the Isite distribution).

I could search the collection successfully via local search in the web
GUI interface. Both full text search on the word "water" and a title
search on the same word yielded the expected results (6 hits for
AnyText="water", 1 hit for Title="water").

I then used the included CSW client (v 2.0.1) to do the same search.
Both GetCapabilities and DescribeRecord worked correctly using GET.
However, GetRecords failed in all cases. Using CQL to send the query
term "water" for AnyText via POST yielded 0 hits (it should have had 6).
Using Filter to send the same query gave an exception:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows&quot; version="1.0.0">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>Rised exception while searching metadata : java.lang.StringIndexOutOfBoundsException: String index out of range: -1</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Using Z39.50 to submit the search did not succeed. Below, I illustrate
using the Isite zclient command-line client program:

1. Search for "water" in AnyText (use attribute 1016), request Full
records in XML. The result was:

zclient, Version 2.2.3-SUSE92, Release 2005040603
Copyright (c) 1995-2004 MCNC/CNIDR and A/WWW Enterprises
2 total records matched your query

1) com.k_int.IR.PresentException: Start+Count-1 must be < the number of items in
the result set

1. Search for "water" in Title (use attribute 4), request Full records
in XML. The result was:

zclient, Version 2.2.3-SUSE92, Release 2005040603
Copyright (c) 1995-2004 MCNC/CNIDR and A/WWW Enterprises
No records returned!

There are exceptions noted ("String index out of range: -1") in the GN log.

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.

I then used the included CSW client (v 2.0.1) to do the same search.
Both GetCapabilities and DescribeRecord worked correctly using GET.
However, GetRecords failed in all cases. Using CQL to send the query
term "water" for AnyText via POST yielded 0 hits (it should have had 6).
Using Filter to send the same query gave an exception:

> <?xml version="1.0" encoding="UTF-8"?>
> <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows&quot; version="1.0.0">
> <ows:Exception exceptionCode="NoApplicableCode">
> <ows:ExceptionText>Rised exception while searching metadata : java.lang.StringIndexOutOfBoundsException: String index out of range: -1</ows:ExceptionText>
> </ows:Exception>
> </ows:ExceptionReport>

The CQL parser is trivial and does not work well: filters should be used instead.
The CSW implementation works for FGDC metadata only if you query the basic
profile (output schema =Record). If you ask for the iso profile, FGDC metadata
are skipped. Anyway, any anomaly is logged: just edit WEB-INF/log4j.cfg and change:

log4j.logger.geonetwork.csw = WARN

into:
log4j.logger.geonetwork.csw = DEBUG

Then, you can send me the logged stacktrace.

Cheers,
Andrea

Andrea Carboni wrote:

The CQL parser is trivial and does not work well: filters should be
used instead. The CSW implementation works for FGDC metadata only if
you query the basic profile (output schema =Record). If you ask for
the iso profile, FGDC metadata are skipped. Anyway, any anomaly is
logged: just edit WEB-INF/log4j.cfg and change:

log4j.logger.geonetwork.csw = WARN

into: log4j.logger.geonetwork.csw = DEBUG

Well, the good news is that I can't reproduce the error. I'm not sure
how I made it fail before but it looks like I'm getting the expected 6
results now via CSW that I also get through the GN GUI. I like problems
that resolve themselves.

I'm moving on to more tests of the Z39.50 server now.

--

Archie

-- Archie Warnock warnock@anonymised.com
-- A/WWW Enterprises www.awcubed.com
-- As a matter of fact, I _do_ speak for my employer.