When you map an XML element to an index field, you specify
which XML elements users can search by specifying a field name in
a query.
Before you begin
Index fields must be defined before you can map
XML elements to them.
About this task
Multiple XML field mappings can exist per collection,
but only one XML root element mapping. The root element of an XML
document applies the mappings accordingly.
When you
create an XML field mapping, or add, change, or delete fields in an
existing XML field mapping, the new and changed mappings apply to
new data and have no effect on data that is already in the index.
To update documents that are already in the index, you must crawl
and index the documents again. If the collection is configured to
use the document cache, you can reindex the documents without recrawling
them.
Procedure
To map XML elements to index fields:
- On the Collections view, expand the
collection that you want to configure. In the Parse and
Index pane, click .
- On the XML Field Mappings page, click Create
XML Mapping.
The Create an XML Field
Mapping page opens.
- In the XML root element name field,
type the root element name: personnel.
Ensure that the name that you specify here exactly matches
the root element in the XML documents that you want to search. When
parsing and indexing XML documents, the system selects which mapping
to use according to the root element name.
- In the XML mapping name field, type
a name for this set of XML field mapping rules.
After
you create a set of XML mapping rules, this name is displayed on the XML
Field Mappings page, and you select this name to add, delete,
or change the mapping rules.
- Specify which XML elements, attributes, and attribute values
you want to map to index fields:
- Click Add Field to add a blank
line to the list of field mapping rules.
- Type the name of the element that you want to map to
an index field.
- Optional: Type the name of an attribute
of this element or the attribute value that you want to map to an
index field.
- Select the index field that you want to map this element
to.
The attributes defined for the selected index field
are applied automatically and you cannot change them.