Skip to content

Commit 1632103

Browse files
committed
Update trgm fulltext search documentation
1 parent c918d66 commit 1632103

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/topics/Search.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ To configure a fulltext search with the trigram backend, set `search_backend` to
291291
- `:term`: The full search text
292292
- `:terms`: A list of search text words (i.e. the full search text split by whitespace).
293293
- `: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.
295295

296296
The `trgm_feature_query` must return the following fields:
297297

@@ -314,15 +314,15 @@ The `trgm_layer_query` must return the following fields:
314314
* `dataproduct_id`: The id of the dataproduct.
315315
* `has_info`: Whether an abstract is available for the dataproduct.
316316
* `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`.
318318

319319
*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).
320320

321321
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:
322322

323323
* `searchtext`: the full search text, as a string
324324
* `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.
326326

327327
Example for `trgm_feature_query_template` to generate an "unrolled" query for each word in the searchtext:
328328

0 commit comments

Comments
 (0)