Open topic with navigation
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.
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.
return a list of all the values that occur in a particular field for all documents.
return a list of all the values that occur in a particular field for documents that match a particular search.
return a count of the number of documents that contain a particular value in a particular field.
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
return the three values of the
Product field that occur in the most documents that match a search for Television:
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:
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:
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.
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.
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.