Interface IFragmentsBuilder
IFragmentsBuilder is an interface for fragments (snippets) builder classes. A IFragmentsBuilder class can be plugged in to FastVectorHighlighter.
Namespace: Lucene.Net.Search.VectorHighlight
Assembly: Lucene.Net.Highlighter.dll
Syntax
public interface IFragmentsBuilder
Methods
| Improve this Doc View SourceCreateFragment(IndexReader, Int32, String, FieldFragList)
create a fragment.
Declaration
string CreateFragment(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Index.IndexReader | reader | Lucene.Net.Index.IndexReader of the index |
System.Int32 | docId | document id to be highlighted |
System.String | fieldName | field of the document to be highlighted |
FieldFragList | fieldFragList | FieldFragList object |
Returns
Type | Description |
---|---|
System.String | a created fragment or null when no fragment created |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | If there is a low-level I/O error |
CreateFragment(IndexReader, Int32, String, FieldFragList, String[], String[], IEncoder)
create a fragment.
Declaration
string CreateFragment(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, string[] preTags, string[] postTags, IEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Index.IndexReader | reader | Lucene.Net.Index.IndexReader of the index |
System.Int32 | docId | document id to be highlighted |
System.String | fieldName | field of the document to be highlighted |
FieldFragList | fieldFragList | FieldFragList object |
System.String[] | preTags | pre-tags to be used to highlight terms |
System.String[] | postTags | post-tags to be used to highlight terms |
IEncoder | encoder | an encoder that generates encoded text |
Returns
Type | Description |
---|---|
System.String | a created fragment or null when no fragment created |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | If there is a low-level I/O error |
CreateFragments(IndexReader, Int32, String, FieldFragList, Int32)
create multiple fragments.
Declaration
string[] CreateFragments(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, int maxNumFragments)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Index.IndexReader | reader | Lucene.Net.Index.IndexReader of the index |
System.Int32 | docId | document id to be highlighter |
System.String | fieldName | field of the document to be highlighted |
FieldFragList | fieldFragList | FieldFragList object |
System.Int32 | maxNumFragments | maximum number of fragments |
Returns
Type | Description |
---|---|
System.String[] | created fragments or null when no fragments created.
size of the array can be less than |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | If there is a low-level I/O error |
CreateFragments(IndexReader, Int32, String, FieldFragList, Int32, String[], String[], IEncoder)
create multiple fragments.
Declaration
string[] CreateFragments(IndexReader reader, int docId, string fieldName, FieldFragList fieldFragList, int maxNumFragments, string[] preTags, string[] postTags, IEncoder encoder)
Parameters
Type | Name | Description |
---|---|---|
Lucene.Net.Index.IndexReader | reader | Lucene.Net.Index.IndexReader of the index |
System.Int32 | docId | document id to be highlighter |
System.String | fieldName | field of the document to be highlighted |
FieldFragList | fieldFragList | FieldFragList object |
System.Int32 | maxNumFragments | maximum number of fragments |
System.String[] | preTags | pre-tags to be used to highlight terms |
System.String[] | postTags | post-tags to be used to highlight terms |
IEncoder | encoder | an encoder that generates encoded text |
Returns
Type | Description |
---|---|
System.String[] | created fragments or null when no fragments created.
size of the array can be less than |
Exceptions
Type | Condition |
---|---|
System.IO.IOException | If there is a low-level I/O error |