gws.base.search.action

Search action.

Source code: gws.base.search.action

Module Contents

class gws.base.search.action.Config

Bases: gws.base.action.Config

Runs searches in the project finders and returns the found features.

categories: list[str] | None

Result categories users can filter search results by.

limit: int = 1000

Max. number of search results.

tolerance: gws.UomValueStr | None

Default tolerance for geometry searches.

class gws.base.search.action.Object

Bases: gws.base.action.Object

Search action, runs searches for the client.

categories: list[str] = []

Result categories users can filter by.

limit = 0

Max. number of results, 0 for no limit.

tolerance: gws.UomValue

Default tolerance for geometry searches.

configure()
find(req: gws.WebRequester, p: Request) → Response

Run a search and return the found features.

props(user)
class gws.base.search.action.Props

Bases: gws.base.action.Props

categories: list[str]
class gws.base.search.action.Request(*args, **kwargs)

Bases: gws.Request

Request of the searchFind command.

categories: list[str] | None

Result categories.

crs: gws.CrsName | None

CRS of the extent, defaults to the map CRS.

extent: gws.Extent | None

Search extent, defaults to the map extent.

keyword: str = ''

Keyword to search for.

layerUids: list[str]

Layers whose finders are used in addition to the project and application finders.

limit: int | None

Max. number of results, cannot exceed the configured limit.

resolution: float

Pixel resolution for geometry searches.

shapes: list[gws.lib.shape.Props] | None

Shapes to search in; several shapes are combined into one.

tolerance: str | None

Tolerance for geometry searches, a value with a unit, in pixels if no unit is given.

views: list[str] | None

Feature views to render, defaults to title, teaser and description.

withCategories: bool

Return result categories.

class gws.base.search.action.Response(*args, **kwargs)

Bases: gws.Response

Response of the searchFind command.

features: list[gws.FeatureProps]

Found features with rendered views.