You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/topics/Search.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -291,7 +291,7 @@ To configure a fulltext search with the trigram backend, set `search_backend` to
291
291
-`:term`: The full search text
292
292
-`:terms`: A list of search text words (i.e. the full search text split by whitespace).
293
293
-`:thres`: The trigram similarity treshold value (note that the service will also separately execute `SET pg_trgm.similarity_threshold = <value>`).
294
-
-`:facets`: The permitted search facets, as a list (only relevant for feature query).
294
+
-`:facets`: The permitted search facets, as a list.
295
295
296
296
The `trgm_feature_query` must return the following fields:
297
297
@@ -314,15 +314,15 @@ The `trgm_layer_query` must return the following fields:
314
314
*`dataproduct_id`: The id of the dataproduct.
315
315
*`has_info`: Whether an abstract is available for the dataproduct.
316
316
*`sublayers`: A JSON stringified array of the shape `[{"ident": "<dataproduct_id>", "display": "<display>", "dset_info": true}, ...]`, or `NULL` if no sublayers exist.
317
-
*`isbackground`: Whether the layer is a background layer.
317
+
*`stacktype`: The layer stacktype, `foreground` or `background`.
318
318
319
319
*Note*: The layer query relies on an additional service, configured as `dataproductServiceUrl` in the viewer `config.json`, which resolves the `dataproduct_id` to a QWC theme sublayer object, like the [`sogis-dataproduct-service`](https://github.com/qwc-services/sogis-dataproduct-service).
320
320
321
321
In alternative to specifying `trgm_feature_query` and/or `trgm_layer_query`, you can set `trgm_feature_query_template` and/or `trgm_layer_query_template` to a [Jinja template string](https://jinja.palletsprojects.com/en/stable/templates/) which generates the final SQL query. The following variables are available in the template string:
322
322
323
323
*`searchtext`: the full search text, as a string
324
324
*`words`: the single words of the search text, as an array
325
-
*`facets`: the permitted search facets, as an array (only relevant for feature query).
325
+
*`facets`: the permitted search facets, as an array.
326
326
327
327
Example for `trgm_feature_query_template` to generate an "unrolled" query for each word in the searchtext:
0 commit comments