You are here: C++ Support Classes > dtSearch Namespace > Classes > DInputStreamBase Class > DInputStreamBase::Fields Data Member
Close
dtSearch Text Retrieval Engine Programmer's Reference
DInputStreamBase::Fields Data Member

String set containing pairs of field names and values to be associated with a document. These field-value pairs are passed to the indexer as dtsInputStream.fields.

Syntax
C++

Field names can include nesting, using / to separate field name elements. Example:

"Meta/Subject", "This is the subject", "Meta/Author", "This is the author"

 

In this example, you could search across both fields by searching for "Meta contains (something)", or you could search for "Author contains (something)", or you could search for "Meta/Author contains (something)" to distinguish this Author field from any other Author fields that might be present in the document. 

Add a * in front of a field name to prevent the field name from being indexed as part of the field. Example:

"*SampleField", "This is the text of SampleField"

 

Add two * in front of a field name to designate the field as a hidden stored field. Example:

"**SampleField", "This is the text of SampleField"

 

Hidden stored fields are automatically stored in the index as document properties, and any text in a hidden stored field is not searchable. After a search, the values of any hidden stored fields will be returned in dtsSearchResultsItem.userFields for each item. 

An application using the dtsDataSource API to generate data to be indexed can use fields to add field data to documents as they are being indexed, without modifying the original documents. 

External file parsers should ignore the contents of fields.