Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 3 Current »

Our search engine gives access to the data in our referential database DF4. This referential database holds the original data of many data providers (publishers, wholesalers, manufacturers). Depending on it's configuration, the webshop can have access to different data providers.

Example URL (JSON) : https://wsmedia.tlsecure.com/api/json/00000/searchEngine/default/select?q=tuin
Example URL (XML) : https://wsmedia.tlsecure.com/api/XML/00000/searchEngine/default/select?q=tuin

Available services :

  • Select - allows the user to search within the shop's available catalogues

Escaping Special Characters

Solr supports escaping special characters that are part of the query syntax. The current list special characters are

+ - && || ! ( ) { } [ ] ^ “ ~ * ? : \ OR AND NOT

To escape these character use the
before the character. For example to search for (1+1):2 use the query:

\\(1\\+1\\)\\:2

Example to replace in PHP:

static function escapeSolrValue($string) {
    $match = array('\\', '+', '-', '&', '|', '!', '(', ')', '{', '}', '[', ']', '^',
     '~', '*', '?', ':', '"', ';', ' ', 'AND', 'OR', 'NOT');
    $replace = array('\\\\', '\\+', '\\-', '\\&', '\\|', '\\!', '\\(', '\\)', '\\{', '\\}', '\\[', '\\]', '\\^',
     '\\~', '\\*', '\\?', '\\:', '\\"', '\\;', '\\ ', '\\AND', '\\OR', '\\NOT');
    $string = str_replace($match, $replace, $string);
 
    return $string;
}
  • No labels