19 using System.Collections.Generic;
23 using Lucene.Net.Index;
24 using Lucene.Net.Search;
26 namespace Lucene.Net.Search
49 private Query context;
57 this.context.
Boost = 0.0f;
73 public AnonymousBooleanQuery(
float boost)
80 return new AnonymousDefaultSimilarity(boost);
87 public AnonymousDefaultSimilarity(
float boost)
92 public override float Coord(
int overlap,
int max)
110 public override int GetHashCode()
114 result = prime * result + BitConverter.ToInt32(BitConverter.GetBytes(boost),0);
115 result = prime * result + ((context == null) ? 0 : context.GetHashCode());
116 result = prime * result + ((match == null) ? 0 : match.GetHashCode());
120 public override bool Equals(Object obj)
126 if (this.GetType() != obj.GetType())
129 if (BitConverter.ToInt32(BitConverter.GetBytes(boost),0) != BitConverter.ToInt32(BitConverter.GetBytes(other.boost),0) )
133 if (other.context != null)
136 else if (!context.Equals(other.context))
140 if (other.match != null)
143 else if (!match.Equals(other.match))
148 public override String ToString(String field)
150 return match.
ToString(field) +
"/" + context.ToString(field);