Interface IFragmentsBuilder
IFragments
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 |
---|---|---|
Index |
reader | Index |
System. |
docId | document id to be highlighted |
System. |
fieldName | field of the document to be highlighted |
Field |
fieldFragList | Field |
Returns
Type | Description |
---|---|
System. |
a created fragment or null when no fragment created |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|---|
Index |
reader | Index |
System. |
docId | document id to be highlighted |
System. |
fieldName | field of the document to be highlighted |
Field |
fieldFragList | Field |
System. |
preTags | pre-tags to be used to highlight terms |
System. |
postTags | post-tags to be used to highlight terms |
IEncoder | encoder | an encoder that generates encoded text |
Returns
Type | Description |
---|---|
System. |
a created fragment or null when no fragment created |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|---|
Index |
reader | Index |
System. |
docId | document id to be highlighter |
System. |
fieldName | field of the document to be highlighted |
Field |
fieldFragList | Field |
System. |
maxNumFragments | maximum number of fragments |
Returns
Type | Description |
---|---|
System. |
created fragments or null when no fragments created.
size of the array can be less than |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|---|
Index |
reader | Index |
System. |
docId | document id to be highlighter |
System. |
fieldName | field of the document to be highlighted |
Field |
fieldFragList | Field |
System. |
maxNumFragments | maximum number of fragments |
System. |
preTags | pre-tags to be used to highlight terms |
System. |
postTags | post-tags to be used to highlight terms |
IEncoder | encoder | an encoder that generates encoded text |
Returns
Type | Description |
---|---|
System. |
created fragments or null when no fragments created.
size of the array can be less than |
Exceptions
Type | Condition |
---|---|
System. |
If there is a low-level I/O error |