Hidden Elements in Zones


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.

Hidden elements must be placed after all of the visible elements in the virtual document, as defined in the style.dft file.

For complete information about the zone filter and the special "noextract" and "noindex" zones, refer to the section, "Special Noindex and Noextract Zones."

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).

Searching over Hidden Zones

Searching over hidden zones is like searching over regular zones. When the above style.dft file is implemented, you can write queries using the <IN> operator, like this:

(query, this, zone) <IN> Keywords

Hidden elements affect some of the Verity search engine's standard behavior in these ways:

For information about searching over zones using the <IN> operator, refer to the Verity K2 Query Language Guide.





Copyright © 2002, Verity, Inc. All rights reserved.