You are here: Symbol Reference > dtSearch.Engine Namespace > Classes > SearchResultsItem Class > SearchResultsItem Methods > GetUserField Method
Close
dtSearch .NET Standard API 2024.02
SearchResultsItem.GetUserField Method

Retrieve a stored field value for this document.

public string GetUserField( string fieldName );

When a document is indexed, dtSearch will store any field-value pairs found in the document when the field name matches one of the StoredFields in the IndexJob used to index this document. The field-value pairs are returned as a List of strings in UserFields. Use GetUserField() to retrieve values by name. 

Example:

SearchResultsItem item = m_results.CurrentItem; string subject = item.GetUserField("Subject");

See Also: Retrieving Fields in Search Results

Copyright (c) 1998-2023 dtSearch Corp. All rights reserved.