19 using Lucene.Net.Index;
22 using Query = Lucene.Net.Search.Query;
25 using Weight = Lucene.Net.Search.Weight;
27 namespace Lucene.Net.Search.
Spans
75 private System.String field;
79 this.maskedQuery = maskedQuery;
80 this.field = maskedField;
83 public override string Field
90 get {
return maskedQuery; }
98 return maskedQuery.GetSpans(reader);
101 public override void ExtractTerms(System.Collections.Generic.ISet<
Term> terms)
103 maskedQuery.ExtractTerms(terms);
108 return maskedQuery.CreateWeight(searcher);
113 return maskedQuery.GetSimilarity(searcher);
121 if (rewritten != maskedQuery)
124 clone.maskedQuery = rewritten;
137 public override System.String ToString(System.String field)
139 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
140 buffer.Append(
"mask(");
141 buffer.Append(maskedQuery.ToString(field));
144 buffer.Append(
" as ");
145 buffer.Append(this.field);
149 public override bool Equals(System.Object o)
153 FieldMaskingSpanQuery other = (FieldMaskingSpanQuery) o;
157 public override int GetHashCode()
159 return MaskedQuery.GetHashCode() ^
Field.GetHashCode() ^ System.Convert.ToInt32(Boost);