IDOL 12.13

# Parametric Search

Parametric search (also known as faceted search) allows you to find documents that have a particular value or range of values in a particular field. This type of search is useful when you want to be able to find a set of documents with particular properties.

For example, if you have a database of products, you might want users to be able to search for `toaster` and then restrict the results by brand, model, color, power usage, and energy efficiency. With parametric search, you can return a list of the brands, models, and so on that exist for all products that match the search toaster. Users can then restrict the search by a particular value.

## Parametric Search Process

To use parametric search, you must configure all the fields that you want to use as parametric fields. Then you can use IDOL Server actions to:

- return a list of all the parametric fields in IDOL Server.

      action=GetTagNames&FieldTypes=Parametric

- return a list of all the values that occur in a particular field for all documents.

      action=GetTagValues&FieldName=Product

- return a list of all the values that occur in a particular field for documents that match a particular search.

      action=GetQueryTagValues&Text=Television&FieldName=Product

- return a count of the number of documents that contain a particular value in a particular field.

      action=GetQueryTagValues&FieldText=MATCH{HD}:Product&FieldName=Product&DocumentCount=True

After you find the value that you want to filter by, you can send a Field Search to IDOL Server to retrieve documents that have this value in this field.

The following examples show some other parameter combinations that you can use with the `GetQueryTagValues` action. For more information, refer to the IDOL Server Reference.

- return a list of values that occur in the `Product` field, and the number of documents that have each value, for documents that match a search for `Television` and that have a value between 150 and 500 in the `PRICE` field:

      action=GetQueryTagValues&Text=Television&FieldText=RANGE{150.00,500.00}:PRICE&FieldName=Product&DocumentCount=True

- return the three values of the `Product` field that occur in the most documents that match a search for Television:

      action=GetQueryTagValues&Text=Television&FieldName=Product&DocumentCount=True&MaxValues=3

- return an alphabetical list of all values that occur in the `Product` field, and the number of documents that have each value, for documents that match a search for Television:

      action=GetQueryTagValues&Text=Television&FieldName=Product&DocumentCount=True&Sort=Alphabetical

- return a list of values of the `autn_date` metadata field that occur in documents that match a search for World Cup, and group the dates into intervals of a day:

      action=GetQueryTagValues&Text=world cup&FieldName=autn_date&date_period=day&DocumentCount=True

## Choose Parametric Fields

You must choose the properties that you want to be able to search for with parametric search. IDOL Server builds an index of these fields to allow it to easily return the parametric values. This process takes a longer time at indexing, so you should choose only the fields that you want to search for.

Ideally, parametric fields should contain only a few different values for all your documents. IDOL Server then has to store only a small number of values, which takes up less index space. Similarly, the list of possible values is short and easy for users to read to find the value they want.

If you want to change the parametric fields after you have indexed content, you can regenerate the parametric index to update it.

## Numeric Ranges

If one of your parametric fields contains a numeric value, you can use parametric ranges. In this case, IDOL Server returns a set of ranges of values, rather than the list of distinct values.

For example, if you want users to be able to search by price, you do not want to create a list of all the possible prices for all of your products. Instead, IDOL Server can automatically create a small number of ranges of values, for example 0-50, 50-100, and so on.

TIP: By default with parametric ranges, you define the number of ranges, and IDOL Server automatically produces the appropriate intervals, according to the range of values in the field.

For example, if the prices of your products range from $10 to $200, a range size of $50 might be appropriate. On the other hand, if the products have a price range of $10,000 to $200,000, a more appropriate range size might be $20,000.

You can optionally choose your own set of ranges by using the `Ranges` action parameter. For more information, refer to the IDOL Server Reference.

Related Topics

- Parametric Search and Field Search

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.13 | Last updated October 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL 12.13

Topic Title: Parametric Search