CSW Request : Search for phrase

111 Views Asked by At

I trying to find a way to search for a phrase. Trying to configure it using PropertyIsLike (wildcard, singleChar, etc) but I can't find a way to be able to search for "text1 text2".

I get result for text1 and text2 but not for "text1 text2". Any idea ?

1

There are 1 best solutions below

0
On

Try using double quotation marks "test1 test2". For example:

<?xml version="1.0"?>

<!-- Use double quotation marks to look for a phrase -->
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                service="CSW" version="2.0.2"
                outputSchema="http://www.opengis.net/cat/csw/2.0.2"
                resultType="results">
    <csw:Query typeNames="csw:Record">
        <csw:ElementSetName>summary</csw:ElementSetName>
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
                <PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
                    <PropertyName>abstract</PropertyName>
                    <Literal>"test1 test2"</Literal>
                </PropertyIsLike>
            </Filter>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>