[GeoNetwork-users] CSW GetRecords problem with spaces

Hello everybody,

I created a dataset with the title "topographic map" based on the ISO
19139 Vector Template.
(only changed the title).

The GeoNetwork GUI is able to find it: "what" = "topographic map" --> ok

also:
http://localhost:8080/geonetwork/srv/en/xml.search?any=topographic%20map

But the following CSW-Request results with 0 matches.

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW" version="2.0.2">
    <csw:Query typeNames="csw:Record">
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;&gt;
                <PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
                    <PropertyName>AnyText</PropertyName>
                    <Literal>%topographic map%</Literal>
                </PropertyIsLike>
            </Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Thank you for any help!

Best regards Juergen

Hi Jürgen, not sure it should work as you expect. AnyText is in CSW
spec define as a "target for full-text search of character data types
in the catalogue".
When indexing full-text search, Lucene Analyzer are used and tokenized
the content.
Then, your example query, I think that your client should take care of
the way you want query tokens and then use the AND/OR operator in
combination with two PropertyIsLike query.

Similar approach could be for ""hydrological basin"
<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2">
    <csw:Query typeNames="csw:Record">
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;&gt;
                <PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
                    <PropertyName>AnyText</PropertyName>
                    <Literal>%hydrological basins%</Literal>
                </PropertyIsLike>
            </Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>
but could be sent by the client using
<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW"
version="2.0.2">
    <csw:Query typeNames="csw:Record">
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;&gt;
<and>
                <PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
                    <PropertyName>AnyText</PropertyName>
                    <Literal>%hydrological%</Literal>
                </PropertyIsLike>
                <PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
                    <PropertyName>AnyText</PropertyName>
                    <Literal>%basins%</Literal>
                </PropertyIsLike>
</and>
            </Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

HTH.
Francois
2009/9/11 Jürgen <juergen.weichand@anonymised.com>:

Hello everybody,

I created a dataset with the title "topographic map" based on the ISO
19139 Vector Template.
(only changed the title).

The GeoNetwork GUI is able to find it: "what" = "topographic map" --> ok

also:
http://localhost:8080/geonetwork/srv/en/xml.search?any=topographic%20map

But the following CSW-Request results with 0 matches.

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd&quot; service="CSW" version="2.0.2">
<csw:Query typeNames="csw:Record">
<csw:Constraint version="1.1.0">
<Filter xmlns="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;&gt;
<PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
<PropertyName>AnyText</PropertyName>
<Literal>%topographic map%</Literal>
</PropertyIsLike>
</Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>

Thank you for any help!

Best regards Juergen

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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