To extend a catalog search:
The following example shows a sample ExtnCatalogSearchConfigProperties.xml file.
<SearchConfigurations>
<SearchSystemConfigurations>
<MergeFactor Value="2"/>
<MaxMergeDocs Value="2147483647"/>
</SearchSystemConfigurations>
<IndexSets>
<IndexSet Name="CatalogIndex">
<Locales>
<Locale LocaleCode="en_US"
SynonymFile="/properties/EnglishSynonym.properties"/>
<Locale LocaleCode="fr_FR"
QueryParserClass="package.FrenchQueryParser.class"
AnalyzerClass="package.FrenchAnalyzer.class"
SynonymFile="/properties/FrenchSynonym.properties"/>
</Locales>
<Entities>
<Entity Name="Item">
<Attributes>
<Attribute XMLName="MyExtendedDescription"
DefaultWeight="1.0" Index="ANALYZED"
Store="Y" UseSynonyms="N" Searchable="Y" Sortable="N"/>
<Attribute IndexFieldName="CustomerItemDescription"
DefaultWeight="1.0" Index="ANALYZED" Store="Y" UseSynonyms="N"
Searchable="Y" Sortable="N" GetExternalValue="Y"/>
</Attributes>
<Entity Name="CategoryItem" RelationshipName="Category_ItemList">
<Entity Name="Category" RelationshipName="Category">
<Attributes>
<Attribute XMLName="MyCategoryExtendedDescription"
DefaultWeight="1.0" Index="ANALYZED" Store="Y"
UseSynonyms="N" Searchable="Y" Sortable="N"/>
</Attributes>
</Entity>
</Entity>
<Entity Name="Asset" RelationshipName="AssetList">
<Attributes>
<Attribute Type="MyManual" DefaultWeight="1.0" Index="ANALYZED"
Store="N" UseSynonyms="N" Searchable="Y" Sortable="N"/>
</Attributes>
</Entity>
</Entity>
</Entities>
</IndexSet>
</IndexSets>
</SearchConfigurations>
Element |
Description |
---|---|
MergeFactor Value |
Specifies the number of documents that the Apache Lucene open source search engine stores in memory before writing them to disk as a single segment. For more information about setting this value, see the Lucene website. |
MaxMergeDocs Value |
Specifies the number of documents that can be contained in one segment. For more information about setting this value, see the Lucene website. |
Element |
Description |
---|---|
LocaleCode |
Specifies the locale code for the index file. If you are adding a locale, ensure that you specify a corresponding analyzer. US-English is the default locale. |
QueryParserClass |
Specifies the path to the query parser. The application provides the Lucene query parser by default. |
AnalyzerClass |
Specifies the path to the analyzer. The application provides corresponding analyzers for the default locale. |
SynonymFile |
Specifies the path to the synonym file for the corresponding locale. Use the synonym file to configure related terms for keyword searches. |
Attribute |
Description |
---|---|
XMLName |
For item and category attributes of Item Entity, specifies the XML attribute name for the field. |
IndexFieldName |
Specifies the field name of the attribute as stored in the index. Values for IndexFieldName must be unique throughout the configuration file. If IndexFieldName is not configured in the xml configuration file, the system derives a value for it based on the formula Entity Name.XMLName. |
Type |
For asset attributes, specifies the asset type in the database. |
Default Weight |
Specifies the weight given to the term. The default value is 1. |
Index |
Specifies one of the following options for storing field values: Analyzed - stores the value as searchable segments. For example, if a user searches for Desktop Computers and the index parameter for the field is analyzed, the search results include items with the terms Desktop Computer, Desktop, and Computer. Non_analyzed - stores the value as it appears in the database, requiring an exact match to return the value. In the previous example, if the search for Desktop Computers was performed on a non_analyzed field, the search would return only items with the term Desktop Computer. |
Store |
Specifies one of the following options for storing field values: Y - stores the value of the attribute in the index so that it may be returned as search output. If the GetExternalValue attribute is set to Y, Store is treated as Y. N - does not store the value and only keeps data in the index for the attribute that is in a proprietary format and used only during the search. |
UseSynonyms |
Specifies one of the following options for including synonyms in the search: Y - indicates that search queries include synonyms. N - indicates that search queries do not include synonyms. |
Searchable |
Specifies one of the following search options for the field: Y - indicates that the field is included as possible search criteria when creating a search query. N - indicates that the field is not included as possible search criteria when creating a search query. For example, the Searchable parameter for the Is_Superseded field in the default XML file is set to N and the Store parameter is set to Y. Users cannot search on the Is_Superseded field in a query. However, queries of superseded items that are obsolete return the superseding items. |
Sortable |
Specifies one of the following sort options for the field: Y - indicates that search results are sorted by this field. N - indicates that search results are not sorted by this item. |
GetExternalValue |
Specifies one of the following options for the field: Y - indicates that the value for this attribute is obtained from an external source through a user exit. N - indicates that the user exit is not called. |