Boost() public static method

for printing boost only if not 1.0
public static Boost ( float boost ) : string
boost float
return string
Ejemplo n.º 1
0
 public override System.String ToString(System.String field)
 {
     System.Text.StringBuilder buffer = new System.Text.StringBuilder();
     if (!Term.Field.Equals(field))
     {
         buffer.Append(Term.Field);
         buffer.Append(":");
     }
     buffer.Append(Term.Text);
     buffer.Append('~');
     buffer.Append(Single.ToString(minimumSimilarity));
     buffer.Append(ToStringUtils.Boost(Boost));
     return(buffer.ToString());
 }
Ejemplo n.º 2
0
        public override System.String ToString(System.String field)
        {
            System.Text.StringBuilder buffer = new System.Text.StringBuilder();
            buffer.Append("spanOr([");
            int j = 0;

            foreach (SpanQuery clause in clauses)
            {
                j++;
                buffer.Append(clause.ToString(field));
                if (j < clauses.Count)
                {
                    buffer.Append(", ");
                }
            }
            buffer.Append("])");
            buffer.Append(ToStringUtils.Boost(GetBoost()));
            return(buffer.ToString());
        }
Ejemplo n.º 3
0
        public override System.String ToString(System.String field)
        {
            System.Text.StringBuilder buffer = new System.Text.StringBuilder();
            buffer.Append("spanOr([");
            System.Collections.Generic.IEnumerator <SpanQuery> i = clauses.GetEnumerator();
            int j = 0;

            while (i.MoveNext())
            {
                j++;
                SpanQuery clause = i.Current;
                buffer.Append(clause.ToString(field));
                if (j < clauses.Count)
                {
                    buffer.Append(", ");
                }
            }
            buffer.Append("])");
            buffer.Append(ToStringUtils.Boost(Boost));
            return(buffer.ToString());
        }