Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catalogue : Search by CSW : text search is (very) too wide #257

Open
MaelREBOUX opened this issue Jul 10, 2020 · 4 comments
Open

Catalogue : Search by CSW : text search is (very) too wide #257

MaelREBOUX opened this issue Jul 10, 2020 · 4 comments

Comments

@MaelREBOUX
Copy link
Member

MapStore CSW request :

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmi="http://www.isotc211.org/2005/gmi" xmlns:ows="http://www.opengis.net/ows" service="CSW" version="2.0.2" resultType="results" startPosition="1" maxRecords="4">
  <csw:Query typeNames="csw:Record">
    <csw:ElementSetName>full</csw:ElementSetName>
    <csw:Constraint version="1.1.0">
      <ogc:Filter>
        <ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\\">
          <ogc:PropertyName>csw:AnyText</ogc:PropertyName>
          <ogc:Literal>%vélo%</ogc:Literal>
        </ogc:PropertyIsLike>
      </ogc:Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

103 metadatas returned

Mapfishapp CSW request

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" service="CSW" version="2.0.2" resultType="results_with_summary" startPosition="1" maxRecords="20" xmlns:gmd="http://www.isotc211.org/2005/gmd">
  <csw:Query typeNames="csw:Record">
    <csw:ElementSetName>full</csw:ElementSetName>
    <csw:Constraint version="1.1.0">
      <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
        <ogc:And>
          <ogc:And>
            <ogc:Or>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Type</ogc:PropertyName>
                <ogc:Literal>data</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Type</ogc:PropertyName>
                <ogc:Literal>dataset</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Type</ogc:PropertyName>
                <ogc:Literal>datasetcollection</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Type</ogc:PropertyName>
                <ogc:Literal>series</ogc:Literal>
              </ogc:PropertyIsEqualTo>
            </ogc:Or>
          </ogc:And>
          <ogc:BBOX>
            <gml:Envelope xmlns:gml="http://www.opengis.net/gml">
              <gml:lowerCorner>-180 -90</gml:lowerCorner>
              <gml:upperCorner>180 90</gml:upperCorner>
            </gml:Envelope>
          </ogc:BBOX>
          <ogc:Or>
            <ogc:Or>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Title</ogc:PropertyName>
                <ogc:Literal>vélo</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>AlternateTitle</ogc:PropertyName>
                <ogc:Literal>vélo</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>Identifier</ogc:PropertyName>
                <ogc:Literal>vélo</ogc:Literal>
              </ogc:PropertyIsEqualTo>
              <ogc:PropertyIsEqualTo matchCase="true">
                <ogc:PropertyName>ResourceIdentifier</ogc:PropertyName>
                <ogc:Literal>vélo</ogc:Literal>
              </ogc:PropertyIsEqualTo>
            </ogc:Or>
            <ogc:And>
              <ogc:Or>
                <ogc:PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!">
                  <ogc:PropertyName>Title</ogc:PropertyName>
                  <ogc:Literal>vélo*</ogc:Literal>
                </ogc:PropertyIsLike>
                <ogc:PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!">
                  <ogc:PropertyName>AlternateTitle</ogc:PropertyName>
                  <ogc:Literal>vélo*</ogc:Literal>
                </ogc:PropertyIsLike>
                <ogc:PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!">
                  <ogc:PropertyName>Abstract</ogc:PropertyName>
                  <ogc:Literal>vélo*</ogc:Literal>
                </ogc:PropertyIsLike>
                <ogc:PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!">
                  <ogc:PropertyName>Subject</ogc:PropertyName>
                  <ogc:Literal>vélo*</ogc:Literal>
                </ogc:PropertyIsLike>
                <ogc:PropertyIsLike matchCase="false" wildCard="*" singleChar="." escapeChar="!">
                  <ogc:PropertyName>OrganisationName</ogc:PropertyName>
                  <ogc:Literal>vélo*</ogc:Literal>
                </ogc:PropertyIsLike>
              </ogc:Or>
            </ogc:And>
          </ogc:Or>
        </ogc:And>
      </ogc:Filter>
    </csw:Constraint>
    <ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc">
      <ogc:SortProperty>
        <ogc:PropertyName>Relevance</ogc:PropertyName>
        <ogc:SortOrder>DESC</ogc:SortOrder>
      </ogc:SortProperty>
    </ogc:SortBy>
  </csw:Query>
</csw:GetRecords>

12 metadatas returned

When GeoNetwork returns 13 metadatas.

Clearly : Mapstore2 return too much metadatas that do not match the query.

I strongly suggest to align to the current Mapfishapp query wich is suitable since years.

@MaelREBOUX
Copy link
Member Author

Well. our alpha testers pointed out that behaviour. Need to discuss and prioritize.

@MaelREBOUX
Copy link
Member Author

MaelREBOUX commented May 19, 2021

@tdipisa
Copy link
Collaborator

tdipisa commented May 19, 2021

@MaelREBOUX what implemented for geosolutions-it/MapStore2#6813 is necessary solve a specific issue related to the MS integration in GeoNode. It can be used as a basis for what is required in this issue which would require anyway more development (eg to make the filter configurable).

@tdipisa
Copy link
Collaborator

tdipisa commented May 19, 2021

@MaelREBOUX we just opened an issue in MapStore for now here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants