<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Andrea,</p>
    <p>It seems to me that the server ignores the filter, which is
      likely a bug given that its GetCapabilies response includes a
      <ogc:ComparisonOperator>Like</ogc:ComparisonOperator>.</p>
    <p>Looking at GDAL logs, it emits a request equivalent to</p>
    <p>$ curl -X POST -H "Content-Type: application/xml; charset=UTF-8"
      -d '<?xml version="1.0" encoding="UTF-8"?><csw:GetRecords
      resultType="hits" service="CSW" version="2.0.2"
      xmlns:csw=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/cat/csw/2.0.2">"http://www.opengis.net/cat/csw/2.0.2"</a>
      xmlns:gml=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
      xmlns:dc=<a class="moz-txt-link-rfc2396E" href="http://purl.org/dc/elements/1.1/">"http://purl.org/dc/elements/1.1/"</a>
      xmlns:dct=<a class="moz-txt-link-rfc2396E" href="http://purl.org/dc/terms/">"http://purl.org/dc/terms/"</a>
      xmlns:ogc=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ogc">"http://www.opengis.net/ogc"</a>
      xmlns:ows=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ows">"http://www.opengis.net/ows"</a>
      xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
      xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/cat/csw/2.0.2http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">"http://www.opengis.net/cat/csw/2.0.2
      http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"</a>><csw:Query
typeNames="csw:Record"><csw:ElementSetName>full</csw:ElementSetName><csw:Constraint
      version="1.1.0"><ogc:Filter><ogc:PropertyIsLike
      wildCard="*" singleChar="_" escapeChar="X"
matchCase="true"><ogc:PropertyName>dc:subject</ogc:PropertyName><ogc:Literal>Impianti
      e strutture
ricettive</ogc:Literal></ogc:PropertyIsLike></ogc:Filter></csw:Constraint></csw:Query></csw:GetRecords>'
      <a class="moz-txt-link-freetext" href="https://geodati.gov.it/RNDT/csw">https://geodati.gov.it/RNDT/csw</a></p>
    <p>which includes the filter specified in -where, but the server
      answers:<br>
    </p>
    <p><?xml version="1.0"
      encoding="UTF-8"?><csw:GetRecordsResponse
      xmlns:csw=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/cat/csw/2.0.2">"http://www.opengis.net/cat/csw/2.0.2"</a>
      xmlns:dc=<a class="moz-txt-link-rfc2396E" href="http://purl.org/dc/elements/1.1/">"http://purl.org/dc/elements/1.1/"</a>
      xmlns:dcmiBox=<a class="moz-txt-link-rfc2396E" href="http://dublincore.org/documents/2000/07/11/dcmi-box/">"http://dublincore.org/documents/2000/07/11/dcmi-box/"</a>
      xmlns:dct=<a class="moz-txt-link-rfc2396E" href="http://purl.org/dc/terms/">"http://purl.org/dc/terms/"</a>
      xmlns:gml=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
      xmlns:ows=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ows">"http://www.opengis.net/ows"</a>
      xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>><br>
      <csw:SearchStatus timestamp="2022-11-15T23:19:01+01:00"/><br>
      <csw:SearchResults elementSet="full" nextRecord="1"
      numberOfRecordsMatched="22" numberOfRecordsReturned="0"
      recordSchema=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/cat/csw/2.0.2">"http://www.opengis.net/cat/csw/2.0.2"</a>/><br>
    </p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 15/11/2022 à 23:00, andy a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHEdGZMxfEdZN4LD0csp6kud2ZdQzDf6=NB8tafdgnseaLA_WQ@mail.gmail.com">
      <div dir="ltr">Hi,
        <div>if I run</div>
        <div><br>
        </div>
        <div>ogrinfo -ro -al "CSW:<a
            href="http://geodati.gov.it/RNDT/csw" moz-do-not-send="true"
            class="moz-txt-link-freetext">http://geodati.gov.it/RNDT/csw</a>"
          -where "subject LIKE 'Impianti e strutture ricettive'"<br>
        </div>
        <div><br>
        </div>
        <div>I have 22 items in the result. But no one of those have in
          the subject the string "'Impianti e strutture ricettive".</div>
        <div>Why don't I have zero results?<br>
        </div>
        <div><br>
        </div>
        <div>Thank you</div>
        <div>
          <div><br>
          </div>
          -- <br>
          <div dir="ltr" class="gmail_signature"
            data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">
                              <div>
                                <div dir="ltr">
                                  <div dir="ltr"><br>
                                  </div>
                                  <div dir="ltr"><span><br>
                                    </span></div>
                                  <div dir="ltr">Andrea Borruso<br>
                                    <br>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>