public String toString(String field) {StringBuilder buffer = new StringBuilder();boolean needParens = (getLowFreqMinimumNumberShouldMatch() > 0);if (needParens) {buffer.append("(");}for (int i = 0; i < terms.size(); i++) {Term t = terms.get(i);buffer.append(newTermQuery(t, null).toString());if (i != terms.size() - 1) buffer.append(", ");}if (needParens) {buffer.append(")");}if (getLowFreqMinimumNumberShouldMatch() > 0 || getHighFreqMinimumNumberShouldMatch() > 0) {buffer.append('~');buffer.append("(");buffer.append(getLowFreqMinimumNumberShouldMatch());buffer.append(getHighFreqMinimumNumberShouldMatch());buffer.append(")");}return buffer.toString();}

public String toString ( String field ) { StringBuilder buffer = new StringBuilder ( ) ; boolean needParens = ( getLowFreqMinimumNumberShouldMatch ( ) > 0 ) ; if ( needParens ) { buffer . append ( "(" ) ; } for ( int i = 0 ; i < terms . size ( ) ; i ++ ) { Term t = terms . get ( i ) ; buffer . append ( newTermQuery ( t , null ) . toString ( ) ) ; if ( i != terms . size ( ) - 1 ) buffer . append ( ", " ) ; } if ( needParens ) { buffer . append ( ")" ) ; } if ( getLowFreqMinimumNumberShouldMatch ( ) > 0 || getHighFreqMinimumNumberShouldMatch ( ) > 0 ) { buffer . append ( '~' ) ; buffer . append ( "(" ) ; buffer . append ( getLowFreqMinimumNumberShouldMatch ( ) ) ; buffer . append ( getHighFreqMinimumNumberShouldMatch ( ) ) ; buffer . append ( ")" ) ; } return buffer . toString ( ) ; }
public override string ToString(string field){var buffer = new StringBuilder();bool needParens = (Boost != 1.0) || (LowFreqMinimumNumberShouldMatch > 0);if (needParens){buffer.Append("(");}for (int i = 0; i < m_terms.Count; i++){Term t = m_terms[i];buffer.Append(NewTermQuery(t, null).ToString());if (i != m_terms.Count - 1){buffer.Append(", ");}}if (needParens){buffer.Append(")");}if (LowFreqMinimumNumberShouldMatch > 0 || HighFreqMinimumNumberShouldMatch > 0){buffer.Append('~');buffer.Append("(");buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", LowFreqMinimumNumberShouldMatch);buffer.AppendFormat(CultureInfo.InvariantCulture, "{0:0.0#######}", HighFreqMinimumNumberShouldMatch);buffer.Append(")");}if (Boost != 1.0f){buffer.Append(ToStringUtils.Boost(Boost));}return buffer.ToString();}
