Configuring a New Path or Root Field
Use the Admin Interface to add a new field configuration to a database:
Navigate to and click the database for which you want to create a field, either from one of the summary tables or in the left tree menu.
Under the database in which you want to create the field, click the Fields link. The Field Summary page appears.
Click the Create tab. The Create Field in Database page appears.
Enter a name for the field.
By default, the field type is path. If creating a path field, enter the path expression. If you want to boost or lower the relevance contribution for matches within this path, specify a weight other than the default of 1.0. Weights greater than 1.0 will boost the relevance contribution and weights lower than 1.0 will lower the contribution. If you are defining multiple paths, click More Items.
Enter as many paths as you need.
[OPTIONAL] Create any Field Range Indexes or Tokenizer overrides. You can also go back and add these later.
Note
Creating a Range Index automatically configures a Field Range Index on the field being created or updated.
If you want the field to include any extra index options from the database, or if you want to remove some index options from the field, check or uncheck those index settings. Index settings shown in bold indicate the setting is inherited from the database setting. You can uncheck an inherited index setting to not inherit the setting from the database-level configuration. For details, see Understanding the Index Option Configuration.
Alternately, if creating a root field, set the field type to root. Note that in most cases, a path field will give you everything you need, and you are not likely to need to create a root field.
If you want the root field to include the root element of the document, even if it is not explicitly included, click the
true
button for include document root. Typically, you leave this set to the default offalse
, unless your field will include most of the elements in the database.Scroll to the bottom of the page and click OK. An Included Elements and Excluded Elements section appear at the bottom of the screen along with corresponding tabs at the top.
If you want to add a word lexicon for the field, enter the collation URI next in the add text box. The URI for the UCA Default Collation,
http://marklogic.com/collation/
, is useful for many applications. For details on collations, see Language Support in MarkLogic Server in the Search Developer’s Guide. Click OK to add the field word lexicon (if you want to create one). If you want to create other field word lexicons with different collations, repeat this step specifying a different collation URI for the new lexicon.Note
You can use the collation builder button to access a wizard that constructs the collation URI for you based on the language and other parameters you enter.
Click the Includes tab to specify elements to include in the field.
On the Included Elements page, specify a local name for the element to include. If the element is in a namespace, specify the namespace URI for the element to include.
[OPTIONAL] If you want to boost or lower the relevance contribution for matches within this element, specify a weight other than the default of 1.0. Weights greater than 1.0 will boost the relevance contribution and weights lower than 1.0 will lower the contribution.
[OPTIONAL] If you want to only include elements that have an attribute with a specified value, enter the attribute namespace URI (if needed), the attribute local name, and a value for the attribute. Then only elements containing attributes with the specified value will be included. You must specify the exact value; no wildcard characters are used.
When you have specified everything for this element, click OK.
Repeat Step 13 - Step 17 for each element you want to include.
Click the Excludes tab to specify elements to exclude from the field.
Enter the namespace URI (if needed) and the local name for the excluded element.
[OPTIONAL] If you want to exclude only elements that have an attribute with a specified value, then enter the attribute namespace URI (if needed), the attribute local name, and a value for the attribute. Then, only elements containing attributes with the specified value will be excluded. You must specify the exact value; no wildcard characters can be used.
Click OK.
Repeat Step 19 - Step 22 for each element you want to exclude.