Defect #827

Bug whith CSW and filtering published metadata

Added by Portier Thomas about 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:09/19/2014
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:PROXY
Target version:4.3.1
Affected version:4.2.7

Description

I configured a virtual CSW service with a rule with a filter on published metadata.

With a GET request it works. But not with a POST one, it returns always 0 metadata. If I configure the rule with "All states", it works.

GET request : http://www.tigeo.fr/proxy/geonetwork-cat?request=GetCapabilities&service=CSW

POST params :

<csw:GetRecords xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dct="http://purl.org/dc/terms/"
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
service="CSW"
resultType="results" startPosition="1" maxRecords="20"
version="2.0.2"
outputSchema="http://www.opengis.net/cat/csw/2.0.2">
<csw:Query typeNames="csw:Record"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml">
<csw:ElementSetName>brief</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>

History

#2 Updated by Portier Thomas about 3 years ago

  • Status changed from New to Rejected

I did not test on the correct version. sorry.

#3 Updated by Portier Thomas over 2 years ago

  • Status changed from Rejected to New
  • Assignee set to Van Hoecke Hélène
  • Affected version changed from 4.0.4 to 4.2.7

I got this problem on the 4.2.7.
I had a look in the log and I noticed that when status is set to published, the request sent to geonetwork is like :

<ogc:Or>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>metadatastate</ogc:PropertyName>
<ogc:Literal>published</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>published</ogc:PropertyName>
<ogc:Literal>2015-03-30 16:34:23</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:And>
</ogc:Or>

Where PropertyIsGreaterThanOrEqualTo is set to the date of the day. That's mean that it filters on metadata published after today... Is there a reason to add this filter?

#4 Updated by Portier Thomas over 2 years ago

Ok I got it, the filter must be set to PropertyIsLessThanOrEqualTo. We want to expose metadata that has been published before today.

#5 Updated by Van Hoecke Hélène over 2 years ago

  • Assignee changed from Van Hoecke Hélène to Portier Thomas

You're right, filter is not correct.
We have to test the state AND the published date but the comparator is not correct on this last one.

#6 Updated by Magoni Bruno over 2 years ago

  • Assignee deleted (Portier Thomas)

#7 Updated by Magoni Bruno over 2 years ago

  • Status changed from New to Affected
  • Assignee set to Van Hoecke Hélène

#8 Updated by Van Hoecke Hélène over 2 years ago

  • Status changed from Affected to Resolved
  • Assignee deleted (Van Hoecke Hélène )
  • Target version set to 4.3.1

#9 Updated by Van Hoecke Hélène over 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF