Technical documentation - Search Manager version 4.5 and 5.0
This guide explains how to configure search and facets.
Version 4.5 and 5.0
This function is available in version 4.5 and 5.0.Â
Overview
Search may now be configured to a much larger extent and user may filter down search results using facets. Facet search is made available when user has used quick search in toolbar and pressed enter to see all search results, or after having searched using canvas search.
User will be allowed to
select categories
select facets and apply texts or select possible values for these facets
see if a catalogue in the search result has content
Â
Usage and configuration
Specification types which are checked as facet will appear on the left side facet pane of the search screen if any of the search results contains a value for that facet.
Configuration is made in profile.config.
Turn on in version 4.5
In version 4.5 the facet based search has to be actively turned on using the new-search="true" command. This will be phased out in version 5.0.
profile.config
<SearchManager>
<!-- In version 4.5 new-search="true" is needed to turn facet based search on. From version 5 new search is the only search. -->
<!-- auto-select-scope="true" will set scope to current catalogue once arriving at a catalogue. Default is true in version 4.x and false in 5.x and later. -->
<SearchManager auto-select-scope="false" new-search="true">
<SearchCategoryProvider>
<!-- Each category will define a search category. The category will appear as sections in quick search drop down and as Show results for options in the search result page.
id is the presentation type
max-hits will set how many hits will be max displayed in quick search drop down
order will define the order the categories are shown, lowest at top. -->
<Category id="Catalogue" max-hits="12" order="10"/>
<Category id="Part" max-hits="12" order="20"/>
<!-- In version 5.0 it is possible to merge categories. Below is sample on how to merge categories that have base-type="Part" and kit="true" into
one type called Parts and kits. Since parts still are visible with the category setting just above search hirs will include both Parts as well as Parts and kits. -->
<Category id="PartAndKit" max-hits="12" order="20" heading="Parts and kits">
<CompoundTrigger logic="any">
<Trigger kit="true"/>
<Trigger base-type="Part"/>
</CompoundTrigger>
</Category>
<Category id="Document" max-hits="12" order="30"/>
<!-- A category may be disabled, and will thus not appear. -->
<Category id="Part assembly" max-hits="0" order="40" heading="Sections" disabled="true">
<!-- In this case part assemblies will not display provided that kit flag is false -->
<Trigger kit="false"/>
</Category>
<!-- id may refer to a created presentation type as kits -->
<Category id="Kit" max-hits="12" order="40" heading="Kit">
<Trigger kit="true"/>
</Category>
<Category id="Illustration" max-hits="0" disabled="true"/>
<Category id="Content set" max-hits="0" disabled="true"/>
<!-- Note that bulletin categiry has a different tag -->
<BulletinCategory id="Bulletin" disabled="true"/>
<!-- Each facet defined below will always be visible for the selected categories. -->
<!-- So PresentationIdentity will be shown for categories Catalogue, PresentationPartNumber will be shown for categories Part and Kit. -->
<Facet id="PresentationIdentity" categories="Catalogue"/>
<Facet id="PresentationPartNumber" categories="Part,Kit"/> <!-- Version 4.5 -->
<Facet id="PartNumber" categories="Part,Kit"/> <!-- Renamed in version 5.0 -->
<!-- KitPartName will be merged with PresentationName to ensure parts and kits are displayed together. -->
<Facet id="PartKitName" copy="PresentationName" categories="Part,Kit" merge-id="Name"/>
<Facet id="PresentationName" excluded-categories="Part,Kit" merge-id="Name"/>
<Facet id="PartKitDescription" copy="PresentationDescription" categories="Part,Kit" merge-id="Description" heading="DetailedDescription"/>
<Facet id="PresentationDescription" excluded-categories="Part,Kit" merge-id="Description"/>
<!-- Specifications are shown as facets if search results contain any such facet. But it is possible to force a facet to be visible. -->
<!-- id SKUNumber is the persistent identity of a specification type so facet SKUNumber will always be visible for categories that has any specification of that type. -->
<Facet id="SKUNumber" visibility="Visible"/>
<!-- It is possible to show if a catalogue has content as a facet. Icon is triggered to show if root node's presistent identity matches reges and that node contains any referenses.
Icon is predefined or defined in css. -->
<!-- availability="any-category" will force the facet to show on all categories and also when no category is selected -->
<CatalogueContentsFacet id="Content" categories="Catalogue" availability="any-category" visibility="Visible" order="1000">
<Content heading="Documents" icon="book" like="%_Documents" root-node="true"/>
<Content heading="SpareParts" icon="cogs" like="%_SpareParts" root-node="true"/>
</CatalogueContentsFacet>
</SearchCategoryProvider>
<!-- Quick search after 4 characters -->
<MinimumSearchLength>4</MinimumSearchLength>
<!-- Content search in advanced search -->
<SearchDocumentContent>false</SearchDocumentContent>
<!-- Turn on/off filtering of the part list in a part assembly -->
<PartAssemblyTableRowFilter>true</PartAssemblyTableRowFilter>
<!-- Hide facet if it has zero in counter. This is available in version 5.1 and later. -->
<HideFacetOnZeroCount>true</HideFacetOnZeroCount>
<Triggers>
<RegexSearchTrigger search-pattern="0*(?'a'[\S]+)">
<!-- (^ *|)0*(?'a'[\S]+) -->
<Actions>
<SearchQueryAliasTriggerAction alias-format="($0|${a})"/>
</Actions>
</RegexSearchTrigger>
</Triggers>
</SearchManager>
</SearchManager>
Note that the category for bulletins (<BulletinCategory>
)is different compared to the categories for presentations (<Category>
)
Available facet id:s
The below facet id:s may be used. Also the persistent identity of specification types may be used as faced id.
Facet id | Description |
---|---|
PresentationIdentity | Â |
PresentationName | Â |
PresentationDescription | Â |
PartNumber (inversion 4.5 it is named PresentationPartNumber) | Â |
Content | Â |
heading | Â |
merge-id | Â |
Attributes on facets
Facet attribute | Description | Example |
---|---|---|
id | Refers to the persistent identity of the specification | |
categories | List of categories which will display this facet. | <Facet id="ProductCategory" categories="Catalogue"/> |
excluded-categories | List of categories which will not display this facet. | <Facet id="PresentationDescription" excluded-categories="Part,Kit"/> |
availability | Will make facet become an option for any category | <Facet id="Region" availability="any-category"/> |
visibility | Will make facet always visible, that is as a column | <Facet id="Region" visibility="Visible"/> |
order | Is used to set sort order of facets, lowest number at top | <Facet id="Region" order="10"/> <CatalogueContentsFacet id="Content" categories="Catalogue" availability="any-category" visibility="Visible" order="1000"> |
Content icons to indicate what content is on a product
Predefined icons
The below sample icons can be referred from the configuration. Icon will appear as a symbol if content exist under a node.
Icon | Comment |
---|---|
icon="book" | Typically used for documentation |
icon="cogs" | Typically used for spare part lists or kits |
All available icons are listed here:Â Technical documentation - Icons.
Custom icons
It is possible to configure custom icons for the content using the css. Sample css as below.
Custom icons
/* Change icon book */
/* Place image Manuals_small.png in site folder in AppData */
.new-advanced-search .hit-table-view .content .fa-book {
width: 20px;
height: 20px;
background-image:url('Manuals_small.png');
background-size: 20px 20px;
}
/* Change icon cogs */
/* Place image SpareParts_small.png in site folder in AppData */
.new-advanced-search .hit-table-view .content .fa-cogs {
width: 20px;
height: 20px;
background-image:url('SpareParts_small.png');
background-size: 20px 20px;
}
Search Scope
Search normally operates on the full database. But once an user has navigated to a catalogue, it is possible to search in that catalogue only. This is controlled by the scope manager.