-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathqwc-search-service.json
More file actions
158 lines (158 loc) · 6.79 KB
/
Copy pathqwc-search-service.json
File metadata and controls
158 lines (158 loc) · 6.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/qwc-services/qwc-fulltext-search-service/master/schemas/qwc-search-service.json",
"title": "QWC Fulltext Search Service",
"type": "object",
"properties": {
"$schema": {
"title": "JSON Schema",
"description": "Reference to JSON schema of this config",
"type": "string",
"format": "uri",
"default": "https://raw.githubusercontent.com/qwc-services/qwc-fulltext-search-service/master/schemas/qwc-search-service.json"
},
"service": {
"title": "Service name",
"type": "string",
"const": "search"
},
"config": {
"title": "Config options",
"type": "object",
"properties": {
"search_backend": {
"description": "Search backend: solr or pg. Default: solr.",
"type": "string"
},
"solr_service_url": {
"description": "SOLR service URL",
"type": "string"
},
"solr_service_auth": {
"description": "SOLR service basic authentication. Default: None",
"type": "object",
"properties": {
"username": {
"description": "Username for SOLR service authentication",
"type": "string"
},
"password": {
"description": "Password for SOLR service authentication",
"type": "string"
}
}
},
"search_result_sort": {
"description": "Search result ordering for solr search results. Default: search_result_sort",
"type": "string"
},
"pg_feature_query": {
"description": "Postgres feature query SQL. You can use the placeholder parameters `:term` (full search string), `:terms` (list of words of the search string), `:thres` (similarity threshold), `:facets` (the permitted search facets, as a list) and `:facetlimit` (maximum number of results per facet). The query must return the columns display, facet_id, id_field_name, feature_id, bbox (as a `[xmin,ymin,xmax,ymax]` string), srid.",
"type": "string"
},
"pg_feature_query_template": {
"description": "Jinja template string to generate the feature query SQL. The following variables are passed to the template: `searchtext` (the full search text, as a string), `words` (the single words of the search text, as an array), `facets` (the permitted search facets, as an array) and `facetlimit` (maximum number of results per facet). The generated SQL can accept the same placeholder parameters and must return the columns as documented in `pg_feature_query`.",
"type": "string"
},
"pg_layer_query": {
"description": "Postgres layer query SQL. You can use the placeholder parameters `:term` (full search string), `:terms` (list of words of the search string), `:thres` (similarity threshold) and `:facets` (the permitted search facets, as a list). The query must return the columns display, dataproduct_id, dset_info, sublayers, stacktype.",
"type": "string"
},
"pg_layer_query_template": {
"description": "Jinja template string to generate the layer query SQL. The following variables are passed to the template: `searchtext` (the full search text, as a string), `words` (the single words of the search text, as an array) and `facets` (the permitted search facets, as an array). The generated SQL can accept the same placeholder parameters and must return the columns as documented in `pg_layer_query`.",
"type": "string"
},
"pg_facet_search_limit": {
"description": "Postgres search result limit per facet. Controls the `facetlimit` parameter passed to the `pg_feature_query`. Note: `pg_facet_search_limit + 1` will be passed to the query, and the results will be limited to `pg_facet_search_limit` in the backed, in order to discover where more than `pg_facet_search_limit` results exist, in which case the backend will return `count: -1` in the facet result counts. ",
"type": "number",
"default": 50
},
"trgm_feature_query": {
"description": "DEPRECATED - use pg_feature_query instead",
"type": "string"
},
"trgm_feature_query_template": {
"description": "DEPRECATED - use pg_feature_query_template instead",
"type": "string"
},
"trgm_layer_query": {
"description": "DEPRECATED - use pg_layer_query instead",
"type": "string"
},
"trgm_layer_query_template": {
"description": "DEPRECATED - use pg_layer_query_template instead",
"type": "string"
},
"trgm_facet_search_limit": {
"description": "DEPRECATED - use pg_facet_search_limit instead",
"type": "number",
"default": 50
},
"trgm_similarity_threshold": {
"description": "Trigram similarity treshold. Default: 0.3",
"type": "number"
},
"word_split_re": {
"description": "Word split Regex",
"type": "string",
"default": "[\\s,.:;\"]+"
},
"search_result_limit": {
"description": "Result count limit per search",
"type": "integer",
"default": 50
},
"db_url": {
"description": "Default DB connection for geometry result query",
"type": "string"
}
},
"required": []
},
"resources": {
"title": "Resources",
"type": "object",
"properties": {
"facets": {
"title": "Search facets",
"type": "array",
"items": {
"title": "Facet",
"type": "object",
"properties": {
"name": {
"description": "Facet name",
"type": "string"
},
"filter_word": {
"type": "string"
},
"table_name": {
"description": "Table/View for search result geometries",
"type": "string",
"default": "search_v"
},
"geometry_column": {
"description": "Geometry column in search result table",
"type": "string",
"default": "geom"
},
"facet_column": {
"description": "Facet name column in search result table",
"type": "string",
"default": "subclass"
},
"db_url": {
"description": "DB connection for geometry result query",
"type": "string"
}
},
"required": ["name", "filter_word"]
}
}
},
"required": ["facets"]
}
},
"required": ["service", "config", "resources"]
}