The /index resource exposes the client API of the indexing capabilities of Weave such as index search.
Info |
---|
For /index resource to function, appropriate Weave server configurations must be in place. |
Top-level resource: services/v1/index
Sub-resources
1
...
. /index/search
Performs an index search for the given search query.
...
type - string constant - type of search:
- WILDCARD - matches indexed values that contain all or part of the search term. If no results are found, a FUZZY search is attempted. E.g. "test" finds terms such as "tests" and "tester"
- FUZZY - matches search indexed values based on the Levenshtein Distance. If no results are found, then a WILDCARD search is attempted, E.g. "roam" finds terms such as "roams" and "foam"
- EXACT - matches the exact search term. If no results are found, then WILDCARD and FUZZY searches are attempted in that order till results are found
- WILDCARDONLY - only perform a WILDCARD type search
- FUZZYONLY - only performs a FUZZY type search
- EXACTONLY - only performs a EXACT type search
crs - Coordinate reference system to present the search results in
...
The following examples explain how each search type responds to the search term "10 Smith Street, 2760".
Example 1 - EXACTONLY search
...
Output
Code Block | ||||
---|---|---|---|---|
| ||||
{ "results": [ { "centroid": { "crs": "EPSG:3857", "x": 16783036.488, "y": -3998664.491 }, "display1": "10 Smith Street, St Marys, 2760", "display2": "", "entity": "property", "envelope": { "crs": "EPSG:3857", "maxx": 16783045.638, "maxy": -3998643.358, "minx": 16783027.292, "miny": -3998685.564 }, "id": "3113662_10_Smith_Street_43_St_Marys_DP2488", "index": 1 } ], "total": 1 } |
...
Output
Code Block | ||||
---|---|---|---|---|
| ||||
{ "results": [ { "centroid": { "crs": "EPSG:3857", "x": 16783036.488, "y": -3998664.491 }, "display1": "10 Smith Street, St Marys, 2760", "display2": "", "entity": "property", "envelope": { "crs": "EPSG:3857", "maxx": 16783045.638, "maxy": -3998643.358, "minx": 16783027.292, "miny": -3998685.564 }, "id": "3113662_10_Smith_Street_43_St_Marys_DP2488", "index": 1 } ], "total": 1 } |
...