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

CSW is getting exception when search keyword with QGIS 's MetaSearch #582

Closed
KenNg117 opened this issue Dec 16, 2024 · 1 comment
Closed
Assignees

Comments

@KenNg117
Copy link

KenNg117 commented Dec 16, 2024

When using QGIS's MetaSearch on CSW of geoportal-server-catalog, searching with keywords would get exception as return (csw:AnyText is not a supported queryable.).

It turns out the QGIS is applying csw:AnyText for the ogc:PropertyName, yet CSW of geoportal-server-catalog only accepts AnyText for the ogc:PropertyName.

Please consider to improve the text search.

Referrence:
image
image2

Request:

<?xml version="1.0" ?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:gmd="http://www.isotc211.org/2005/gmd" outputSchema="http://www.opengis.net/cat/csw/2.0.2" outputFormat="application/xml" version="2.0.2" service="CSW" resultType="results" startPosition="1" maxRecords="10" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
	<csw:Query typeNames="csw:Record">
		<csw:ElementSetName>full</csw:ElementSetName>
		<csw:Constraint version="2.0.2">
			<ogc:Filter>
				<ogc:PropertyIsLike wildCard="%" singleChar="_" escapeChar="\">
					<ogc:PropertyName>csw:AnyText</ogc:PropertyName>
					<ogc:Literal>map</ogc:Literal>
				</ogc:PropertyIsLike>
			</ogc:Filter>
		</csw:Constraint>
	</csw:Query>
</csw:GetRecords>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<ExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ows">
    <Exception exceptionCode="InvalidParameterValue" locator="PropertyName">
        <ExceptionText>
csw:AnyText is not a supported queryable.
		</ExceptionText>
    </Exception>
</ExceptionReport>
@KenNg117 KenNg117 changed the title CSW is getting error when search keyword with QGIS 's MetaSearch CSW is getting exception when search keyword with QGIS 's MetaSearch Dec 16, 2024
@mhogeweg mhogeweg self-assigned this Dec 24, 2024
@mhogeweg
Copy link
Member

hi, I believe I have resolved this issue. After a small change in I can search my geoportal server CSW from QGIS. The change is to allow csw:AnyText as an alias of AnyText searches. The change is available in PR #584.

The modified file is in the geoportal-search component: GetRecordsParser.js, line 159.

image

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

2 participants