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 2 Next »

The Select-resource allows the user to search within the shop's available catalogues.

The Select-resource accepts the use of query string parameters (pagination) and has the ability to return the data in a specific data-template (ONIX3, XML). Advanced searching and filtering is provided by the use of indexes.


Modifier

Query string parameters

The Search engine accepts query string parameters for querying and pagination. The format for query string parameters is the full resource URL followed by a question mark, and the parameters (if multiple, separated by an ampersand):

Example

https://wsmedia.tlsecure.com/api/XML/00000/searchEngine/default/select?q=tuin&start=5&rows=10

Modifier

q-parameter

The q-parameter is the main query for the request. Every call to the Select-resource should at least have the q-parameter.

This parameter contains the value on which a search will be executed.

View more information about the query syntax >>

Example

https://wsmedia.tlsecure.com/api/XML/00000/searchEngine/default/select?q=tuin

Modifier

start-parameter

The start-parameter is used to paginate results from a query. By using this parameter you can control where a search starts.

e.g. When this parameter is specified, the response will display results starting at the result indicated in the start-parameter. If the value of the start-parameter is 5, then the search will start at the 6th result.

The default value is “0”. The maximum value is “1000”.

Example

https://wsmedia.tlsecure.com/api/XML/00000/searchEngine/default/select?q=tuin&start=5 - Results start at the 6th result

Modifier

rows-parameter

The rows-parameter is used to paginate results from a query. It specifies the maximum number of results the search will return. You can consider it as the maximum number of result appear in the page.

The default value is “10”, the maximum value is “100”.

Example

https://wsmedia.tlsecure.com/api/XML/00000/searchEngine/default/select?q=tuin&rows=25 - 25 results will be returned


Modifier

Path parameters

The Search engine accepts path parameters for defining the response format and the data-template. By altering the API-path you can configure the way the results are presented/returned.

Available path parameters:

Modifier

Return-type

A Response Writer generates the formatted response of a search. The Response-format path parameter selects the Response Writer to be used. The table below lists the available formats:

If you don't set a formatted response of a search, it will default to xml.

type Parameter Setting

Return-type

xml

XMLResponseWriter (only for TiteLive interernal use)

json

JSONResponseWriter

Example

https://wsmedia.tlsecure.com/api/json/00000/searchEngine/default/select?q=tuin - Response will be returned as JSON (Screenshot) https://wsmedia.tlsecure.com/api/xml/00000/searchEngine/default/select?q=tuin - Response will be returned as XML (Screenshot)

Modifier

Data-template

The Data-template path parameter sets the data-template in which the results will be presented. The most commonly used data-template is the ONIX3.0-template as it is considered the book industry's standard for communicating product information.

The Titelive data-template is supported for compatibility-reasons.

tpl Parameter Setting

Data-template

onix3

ONIX3.0 template light (essential information, deprecated)

onix3_full

ONIX3.0 template full (extended information)

default

Restricted template, only for TiteLive interernal use

Example

https://wsmedia.tlsecure.com/api/json/00000/searchEngine/onix3/select?q=tuin - Results will be presented as ONIX3.0 https://wsmedia.tlsecure.com/api/json/00000/searchEngine/default/select?q=tuin - Results will be presented as Titelive XML (Screenshot)

More information about the ONIX-standard can be found here

Modifier

facets-parameter

Faceting is the arrangement of search results into categories based on indexed terms. Searchers are presented with the indexed terms, along with numerical counts of how many matching documents were found were each term. Faceting makes it easy for users to explore search results, narrowing in on exactly the results they are looking for.

The table below summarizes the general parameters for controlling faceting.

Parameter

Description

facet

If set to true, enables faceting.

facet.query

Specifies a query to generate a facet count.

These parameters are described in the sections below.

The facet Parameter

If set to “true,” this parameter enables facet counts in the query response. If set to “false” to a blank or missing value, this parameter disables faceting. None of the other parameters listed below will have any effect unless this parameter is set to “true.” The default value is blank.

The facet.query Parameter

This parameter allows you to specify an arbitrary query in the Lucene default syntax to generate a facet count. By default, Solr's faceting feature automatically determines the unique terms for a field and returns a count for each of those terms. Using facet.query, you can override this default behavior and select exactly which terms or expressions you would like to see counted. In a typical implementation of faceting, you will specify a number of facet.query parameters. This parameter can be particularly useful for numeric-range-based facets or prefix-based facets. You can set the facet.query parameter multiple times to indicate that multiple queries should be used as separate facet constraints. To use facet queries in a syntax other than the default syntax, prefix the facet query with the name of the query notation.

Field-Value Faceting Parameters

Several parameters can be used to trigger faceting based on the indexed terms in a field. When using this parameter, it is important to remember that “term” is a very specific concept in Lucene: it relates to the literal field/value pairs that are indexed after any analysis occurs. For text fields that include stemming, lowercasing, or word splitting, the resulting terms may not be what you expect. If you want Solr to perform both analysis (for searching) and faceting on the full literal strings, use the copyField directive in your Schema to create two versions of the field: one Text and one String. Make sure both are indexed=“true”. The table below summarizes Solr's field value faceting parameters.

Parameter

Description

facet.field

Identifies a field to be treated as a facet.

facet.mincount

Specifies the minimum counts required for a facet field to be included in the response.

These parameters are described in the sections below.

The facet.field Parameter

The facet.field parameter identifies a field that should be treated as a facet. It iterates over each Term in the field and generate a facet count using that Term as the constraint. This parameter can be specified multiple times in a query to select multiple facet fields.

If you do not set this parameter to at least one field in the schema, none of the other parameters described in this section will have any effect

The facet.mincount Parameter

The facet.mincount parameter specifies the minimum counts required for a facet field to be included in the response. If a field's counts are below the minimum, the field's facet is not returned. The default value is 0. This parameter can be specified on a per-field basis with the syntax of f.<fieldname>.facet.mincount.

Example:

https://wsmedia.tlsecure.com/api/json/00000/searchEngine/onix3/select?q=superman&facet=true&facet.query=PRICETTC[1%20TO%2025]&facet.query=PRICETTC[26%20TO%2050]

  • No labels