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

Search: It should be possible to add a WMS layer as searchable without specifying any search fields #1233

Closed
jacobwod opened this issue Nov 4, 2022 · 1 comment
Assignees
Labels
bug plugin:search Functionality and features of the (core) Search plugin
Milestone

Comments

@jacobwod
Copy link
Member

jacobwod commented Nov 4, 2022

The problem

Currently, if we setup a WMS layer with the following search settings:
Skärmavbild 2022-11-04 kl  15 28 36

We'd get something like this in the call to the WMS service (please note the PropertyName, it's empty!):

<GetFeature
	xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3" maxFeatures="100" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Query typeName="op2050_a_vattendjup_vid_skyfall" srsName="EPSG:3008">
		<Filter
			xmlns="http://www.opengis.net/ogc">
			<PropertyIsLike wildCard="*" singleChar="." escapeChar="!" matchCase="false">
				<PropertyName></PropertyName>
				<Literal>stora*</Literal>
			</PropertyIsLike>
		</Filter>
	</Query>
</GetFeature>

The motivation

One use case is that we would like to make a WMS layer searchable using the spatial tools, but there is not need (or no data to search in!) regarding textual searches.

The solution

If no searchFields are defined but the geometry column is specified, we should only care about this layer for spatial searches.

@jacobwod jacobwod added bug plugin:search Functionality and features of the (core) Search plugin labels Nov 4, 2022
@jacobwod jacobwod added this to the 3.x milestone Nov 4, 2022
@jacobwod jacobwod modified the milestones: 3.x, 3.11 Nov 7, 2022
@jacobwod jacobwod self-assigned this Nov 7, 2022
@Hallbergs
Copy link
Member

Very nice! Search sources only intended for spatial search are probably not that uncommon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug plugin:search Functionality and features of the (core) Search plugin
Projects
None yet
Development

No branches or pull requests

2 participants