Skip to content

Commit 86dd055

Browse files
author
hka
committed
Improve wording, add better example config snippet
1 parent 747a68d commit 86dd055

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

src/topics/Search.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Here is an example XML file:
164164
</dataConfig>
165165
```
166166

167-
The next table shows how the values, that are surrounded by {}, need to be defined.
167+
The next table shows how the values, that are surrounded by `{}`, need to be defined.
168168

169169
| **Name** | **Definition** | **Example** |
170170
|--------------------------|-----------------------------------------------------------------------------------|------------------|
@@ -215,16 +215,28 @@ Then add a new facet to the facets list. An example entry could be:
215215

216216
```json
217217
{
218-
"name": "SEARCH_NAME",
219-
"filter_word": "OPTIONAL_SEARCH_FILTER",
220-
"table_name": "SCHEMA.SEARCH_TABLE_NAME",
221-
"geometry_column": "GEOMETRY_FIELD",
222-
"search_id_col": "PRIMARY_KEY"
218+
"name": "search",
219+
"config": {
220+
"solr_service_url": "http://qwc-solr:8983/solr/gdi/select",
221+
"search_result_limit": 50,
222+
"db_url": "postgresql:///?service=qwc_geodb"
223+
},
224+
"resources": {
225+
"facets": [
226+
{
227+
"name": "SEARCH_NAME",
228+
"filter_word": "OPTIONAL_SEARCH_FILTER",
229+
"table_name": "SCHEMA.SEARCH_TABLE_NAME",
230+
"geometry_column": "GEOMETRY_FIELD",
231+
"search_id_col": "PRIMARY_KEY"
232+
}
233+
]
234+
}
223235
}
224236
```
225237

226238
The `filter_word` field can be specified to activate / deactivate searches,
227-
if you have configure multiple searches for one map.
239+
if you have configure multiple searches for one theme.
228240
Normally `filter_word` is left empty (`""`) which results in the search always
229241
being active.
230242
But if specified (e.g. `"house_no"` then the fulltext search will only use
@@ -249,7 +261,7 @@ and give the users the necessary rights in the Admin GUI.
249261
]
250262
```
251263

252-
When activating a search to a map, you can either:
264+
When activating a search to a theme, you can either:
253265

254266
* Add the search name to the `default` list, where it is always active
255267
* Add the search name to the `layers` object, where it is only active if the QGIS layer called `QGIS_LAYER` is present on the map

0 commit comments

Comments
 (0)