19 using System.Collections.Generic;
22 using Lucene.Net.Index;
24 namespace Lucene.Net.Search.Vectorhighlight
29 public static bool DEFAULT_PHRASE_HIGHLIGHT =
true;
30 public static bool DEFAULT_FIELD_MATCH =
true;
31 private bool phraseHighlight;
32 private bool fieldMatch;
35 private int phraseLimit = Int32.MaxValue;
63 this.phraseHighlight = phraseHighlight;
64 this.fieldMatch = fieldMatch;
65 this.fragListBuilder = fragListBuilder;
66 this.fragmentsBuilder = fragmentsBuilder;
76 return new FieldQuery(query, phraseHighlight, fieldMatch);
90 String fieldName,
int fragCharSize)
92 FieldFragList fieldFragList = GetFieldFragList(fieldQuery, reader, docId, fieldName, fragCharSize);
93 return fragmentsBuilder.CreateFragment(reader, docId, fieldName, fieldFragList);
107 String fieldName,
int fragCharSize,
int maxNumFragments)
109 FieldFragList fieldFragList = GetFieldFragList(fieldQuery, reader, docId, fieldName, fragCharSize);
110 return fragmentsBuilder.CreateFragments(reader, docId, fieldName, fieldFragList, maxNumFragments);
114 String fieldName,
int fragCharSize)
118 return fragListBuilder.CreateFieldFragList(fieldPhraseList, fragCharSize);
125 public bool IsPhraseHighlight()
127 return phraseHighlight;
134 public bool IsFieldMatch()
144 public int PhraseLimit
146 get{
return phraseLimit; }
147 set{ this.phraseLimit = value; }