Method Highlight
Highlight(String, Query, IndexSearcher, TopDocs)
Highlights the top passages from a single field.
Declaration
public virtual string[] Highlight(string field, Query query, IndexSearcher searcher, TopDocs topDocs)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | field name to highlight. Must have a stored string value and also be indexed with offsets. |
Query | query | query to highlight. |
IndexSearcher | searcher | searcher that was previously used to execute the query. |
TopDocs | topDocs | TopDocs containing the summary result documents to highlight. |
Returns
Type | Description |
---|---|
System.String[] | Array of formatted snippets corresponding to the documents in |
Highlight(String, Query, IndexSearcher, TopDocs, Int32)
Highlights the top-N passages from a single field.
Declaration
public virtual string[] Highlight(string field, Query query, IndexSearcher searcher, TopDocs topDocs, int maxPassages)
Parameters
Type | Name | Description |
---|---|---|
System.String | field | field name to highlight. Must have a stored string value and also be indexed with offsets. |
Query | query | query to highlight. |
IndexSearcher | searcher | searcher that was previously used to execute the query. |
TopDocs | topDocs | TopDocs containing the summary result documents to highlight. |
System.Int32 | maxPassages | The maximum number of top-N ranked passages used to form the highlighted snippets. |
Returns
Type | Description |
---|---|
System.String[] | Array of formatted snippets corresponding to the documents in |