Method CreateFragments
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 |
---|---|---|
IndexReader | reader | |
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 |
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 |
---|---|---|
IndexReader | reader | |
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 |