Hidden elements allow you to add text to the virtual document that gets indexed but cannot be viewed. This provides a way to add document fields to the full-text index for the document, allowing them to be searched faster than with standard field search, but preventing them from being viewed as part of the document. If the fields are enclosed in "hidden" zones, the fields can be searched using standard zone search syntax.
style.dft
file.
Entries in the style.dft File
Hidden elements are defined in the style.dft
file using the /hidden
modifier. Here's an example:
- $control: 1
- dft:
- {
- field: DOC
- /filter="universal"
- zone-begin: NOEXTRACT
- /hidden=yes
- field: Title
- /zone=Title
- field: Keywords
- /zone=Keywords
- zone-end: NOEXTRACT
- }
Using the
style.dft
file above, the Verity engine adds a Title
zone and a Keywords
zone to the end of the virtual document. The zones will be indexed but not included in the viewing stream. If the Keywords
field is generated by the META tag filter, it will be inserted and indexed in the Keywords zone. The zone-begin and zone-end keywords define the boundaries for the hidden zone. The
noextract
label tells the summarizer to disregard the text of these hidden fields for feature extraction and summarization in the indexing stream. A noextract
zone is a special zone type. In the example above, the noextract type with the /hidden attribute is applied to the Title
and Keywords
zones. In general, if the /hidden
attribute is specified for a zone, all elements contained within the zone are also hidden. Paragraph breaks are automatically inserted between hidden fields so that
PHRASE
queries don't hit across document-field and field-field boundaries (though NEAR
queries might still hit).
style.dft
file is implemented, you can write queries using the <IN> operator, like this:
query
, this
, zone
) <IN> Keywords