Skip to main content

Administrating MarkLogic Server

Overview of Field Configuration Options

The following lists the main options you can set in the field query configuration to control how queries against the specified field are resolved:

  • By default, no XML elements or JSON properties are included in the field query configuration and the indexing options are the same as the database indexing options. You must specify at least one element or property to include for the field to include anything.

  • All field configurations are set on a per-database basis.

  • The field configuration controls the behavior of the cts:field-word-query, cts:field-value-query, cts:field-range-query, cts:field-words, and cts:field-word-match APIs. This includes controlling the terms that get indexed as well as controlling the terms that are returned from the filter (evaluator) portion of query evaluation.

  • Fields inherit the database index settings as a starting point for its index settings.

  • You can add extra index options for each field. These added index options will not affect other queries (for example, cts:word-query, cts:element-word-query, cts:element-attribute-word-query, cts:json-property-word-query).

  • If you check index options in a field that are enabled in the database, it will not change any behavior. However, if you subsequently disable a database index setting that is checked in the field setting, it will remain for the field.

  • You can include and/or exclude named XML elements or JSON properties from path and root fields.

  • For any XML element you include, you can optionally constrain it by a value for a specified XML element attribute.

  • For any XML element or JSON property you include in a path or root field, you can optionally specify a weight. The weight is used when determining relevance scores, where a weight greater than 1.0 will boost scores and a weight lower than 1.0 will lower scores for matches within the element or property.

  • Each field has its own set of indexes; it does not share the indexes with the word query indexes. Therefore, if you have a field with fewer elements than word query, there is a smaller amount of content to index and fewer I/O operations are needed to resolve the query from the indexes (index resolution phase of query processing).

There are three types of fields:

Root and Path fields are described in Root and Path Fields. Metadata fields are described in Metadata Fields.