Customizing Search Logics

NETVIBES OnePart deploys a default sl0 Search Logic however, you can edit it to configure:

  • Facets
  • Hit Content
  • Results sorting & relevance > Grouping
  • Query language > Query prefix handlers
  • Query expansion
  • Limits
  • Query template
  • Virtual fields
Note: Although you can directly edit the search logic configuration, you should favor configuring the Data model (when possible) that will auto-generate the required search logic configuration. This is possible for facets, hit content, and Query language’s prefix handlers.

This task shows you how to:

Context: Details on customizing the facets in OnePart are below.

Create new facets

To create new facets you can do the following:

  • (recommended) add a property in the Data Model that maps the new property to the Search logic’s Facet configuration; see Add a new meta to the data model.
    • For example, add a property to the 3d_shape class and enable the Category facet option.
  • add new facets directly in the search logic configuration for Range facets.
    • For example, such as the Numerical explicit range facets used by OnePart to display the MassRange and BBDimRange based on the user’s preference: metric or imperial.



Configure existing range facets

OnePart uses numerical range facets such as the MassRange and BBDimRange facets to display certain OnePart features in the OnePart UI. These ranges can be customized in the search logic configuration. The user can select his/her preferences for the displays units; either metric or imperial therefore, a facet must exist for each unit type: BBDimRange_imperial and BBDimRange_metric.

Context:

For example, to add more precision to the facet used to display the Component mass in imperial units in the OnePart UI then you must edit the MassRange_imperial facet.

Note: OnePart stores the values in international metric format, therefore you must convert the imperial values to metric to determine the minimum and maximum range values.


  1. In the Administration Console, go to Search Logics and then the search logic configuration, sl0

    Important: Requires the OnePart Customization SDK

  2. Click the facet that you need to modify, for example, MassRange_imperial
  3. Edit the ranges that suit your parts’ needs.



  4. Click Apply to apply the configuration changes.

    For details, see:

    • Data model classes, see the OnePart Reference Guide
    • Range facets, see the Exalead CloudView Configuration Guide

Create hit Content

To create custom hit content (metas) you can either:

Context:

  • (recommended) add a property in the Data Model that maps the new property to the Search Logics’s Hit content configuration; see Customizing the Data Model. For example, add a property to the 3d_shape class and enable the Index field option. For details on data model classes, see the OnePart Reference Guide.
  • add custom metas directly in the search logic configuration: Search Logic > Hit content

Create Query prefix handlers

To create custom prefix handlers you can either:

  1. (recommended) create new properties in a data model class that have the option Search­able with prefix enabled; the mapping in Search logics is auto-generated by the Data model. See the Customizing the Data Model. OR
  2. add custom query prefix handlers in the Search Logic > Query Language

How are search queries processed

You may need to customize the way queries are processed. This chapter focuses only on the processing of queries, once sent to the Search API. Customization points are possible, especially when using Mashup UI and the Mashup API.

Context:

Note: For details on search processing, see the Exalead CloudView Configuration Guide: Configuring search queries.

Query processing workflow - custom elements are shown with a green dotted line: