currently I have to deal with a task where the solution is based on "use the named search options" of xLocate 1 to override native configuration values through the API.
Though the standard documentation mentions the class NamedSearchOption the document does not really explain the meaning of this parameter. Let me close this gap:
- The methods findAddress and findAddressByText offer a parameter array of type SearchOptionBase
- SearchOptionBase is an abstract base class
- Within the xLocate Server's configuration folder you can find various files named "native-*.xml", e.g.
- Such a file tunes the engine via more than 50 parameters, e.g.
Code: Select all
<ExtensiveSearch Value="1" Type="bool"/>
- You can override each and every one of those values from client side
- A NamedSearchOption is based on two properties:
Attribute name type description param String The parameter of the searchoption. value string The value of the parameter. - So to override the extensive search parameter from the native default just set:
Code: Select all
{ "$type": "NamedSearchOption", "value": "false", "param": "ExtensiveSearch" }
- use this object to fill the array of the options in the signature of findAddress or findAddressByText
Best regards,
Bernd