20 namespace Lucene.Net.Search
57 public FieldDoc(
int doc,
float score):base(doc, score)
62 public FieldDoc(
int doc,
float score, System.IComparable[] fields):base(doc, score)
68 public override System.String ToString()
72 System.Text.StringBuilder sb =
new System.Text.StringBuilder(base.ToString());
74 for (
int i = 0; i < fields.Length; i++)
76 sb.Append(fields[i]).Append(
", ");
84 internal object[] fieldsClone = null;
86 [System.Runtime.Serialization.OnSerializing]
87 void OnSerializing(System.Runtime.Serialization.StreamingContext context)
89 if (fields == null)
return;
92 fieldsClone =
new object[fields.Length];
93 for (
int i = 0; i < fields.Length; i++)
95 fieldsClone[i] = fields[i];
99 [System.Runtime.Serialization.OnDeserialized]
100 void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
102 if (fieldsClone == null)
return;
105 fields =
new IComparable[fieldsClone.Length];
106 for (
int i = 0; i < fields.Length; i++)
108 fields[i] = (IComparable)fieldsClone[i];