facetTree

Facets are a way of labeling data so that it can be navigated in different ways. A facet tree is a hierarchy of facets that narrow the number of matching documents.

Object Type

Creatable

Object Key

facetName

Object Key Command Syntax

--FACETNAME=name

State Properties

None

Supported Operations

create
createAll
delete
deleteAll
deleteList
export
exportAll
exportList

Administration GUI Page

None

XML Description

The <search:facetTrees> element describes facet trees:

<search:facetTrees>
   <search:facetTree>
<!-- Properties -->
      <search:facetName>
      <search:facetType>
      <search:mappedSearchAttribute>
      <search:newValuePolicy>

Element Descriptions 

<search:facetTrees>

One or more <search:facetTree> elements.

<search:facetTree>

Describes a facet tree. It contains these elements:

<search:facetName>
<search:facetType>
<search:mappedSearchAttribute>
<search:newValuePolicy>
<search:translations>
<search:facetName>

Name of the facet. The maximum length is 2000 bytes in UTF-8. Required.

<search:facetType>

Data type of <search:mappedSearchAttribute>. Set to STRING only. Required.

<search:mappedSearchAttribute>

Name of the search attribute whose values are used as the facet values. The data type must be the same as <search:facetType>. The maximum length of a string facet is 2000 bytes in UTF-8.

<search:newValuePolicy>

Controls validation of new values in the facet during a crawl:

  • ACCEPT ALL: Adds new values to the facet tree.

Example

This XML document describes two facet trees, Country and Variety:

<?xml version="1.0" encoding="UTF-8"?>
 
<search:config productVersion="11.2.1.0.0" xmlns:search="http://xmlns.oracle.com/search">
<search:facetTrees>
   <search:facetTree>
      <search:facetName>Country</search:facetName>
      <search:facetType>STRING</search:facetType>
      <search:mappedSearchAttribute>Country</search:mappedSearchAttribute>
      <search:newValuePolicy>ACCEPT_ALL</search:newValuePolicy>
      <search:translations>
         <search:translation language="en">
            <search:translatedValue>Country</search:translatedValue>
         </search:translation>
      </search:translations>
   </search:facetTree>
   <search:facetTree>
      <search:facetName>Variety</search:facetName>
      <search:facetType>STRING</search:facetType>
      <search:mappedSearchAttribute>Variety</search:mappedSearchAttribute>
      <search:newValuePolicy>ACCEPT_ALL</search:newValuePolicy>
      <search:translations>
         <search:translation language="en">
            <search:translatedValue>Variety</search:translatedValue>
         </search:translation>
         <search:translation language="de">
            <search:translatedValue>Vielfalt</search:translatedValue>
         </search:translation>
      </search:translations>
   </search:facetTree>
</search:facetTrees>
</search:config>