This section describes how search interfaces perform record searches on specified dimensions and properties, which are known as the members of the search interface. It also describes the components of search interfaces and the JSON syntax for configuring these components.

A search interface is configured by a SEARCH_INTERFACE element in recsearch_config.xml. As a model for your own search interface configuration, use the following SEARCH_INTERFACE element in the version of recsearch_config.xml provided in the Discover Electronics reference application:

<SEARCH_INTERFACE CROSS_FIELD_BOUNDARY="ALWAYS" cross 
		FIELD_RELEVANCE_RANK="0" 
		DEFAULT_RELRANK_STRATEGY="All" NAME="All"> 
		<MEMBER_NAME RELEVANCE_RANK="8">product.id</MEMBER_NAME> 
		<MEMBER_NAME RELEVANCE_RANK="7">product.sku</MEMBER_NAME> 
		<MEMBER_NAME RELEVANCE_RANK="6">product.code</MEMBER_NAME>	  
		<MEMBER_NAME RELEVANCE_RANK="5">product.brand.name</MEMBER_NAME> 
		<MEMBER_NAME RELEVANCE_RANK="4">product.category</MEMBER_NAME> 
		<MEMBER_NAME RELEVANCE_RANK="3">product.name</MEMBER_NAME>  
		<MEMBER_NAME RELEVANCE_RANK="2" 
    SNIPPET_SIZE="25">product.short_desc</MEMBER_NAME> 
		<MEMBER_NAME RELEVANCE_RANK="1">product.long_desc</MEMBER_NAME> 
</SEARCH_INTERFACE> 

You must specify values for the following attributes of the SEARCH_INTERFACE element:

To be useful, a search interface should include two or more members. Individual dimensions and properties can be searched without being members of a search interface.

The members can be dimensions or properties of indexed records. Every member must be enabled for record search. Each member of the search interface is specified in a separate MEMBER_NAME subelement of the SEARCH_INTERFACE element; for example:

<MEMBER_NAME RELEVANCE_RANK="2" SNIPPET_SIZE="25">product.short_desc</MEMBER_NAME> 

where:

Search interfaces can contain both wildcard-enabled and non-wildcard-enabled members. Only wildcard-enabled members will return wildcard-expanded results, however. Wildcard search can be enabled for particular dimensions and properties; for information about how to do this, see Parameters of dimensions and properties in index-config.json .


Copyright © Legal Notices