public SpanQuery makeSpanClause() {SpanQuery [] spanQueries = new SpanQuery[size()];Iterator<SpanQuery> sqi = weightBySpanQuery.keySet().iterator();int i = 0;while (sqi.hasNext()) {SpanQuery sq = sqi.next();float boost = weightBySpanQuery.get(sq);if (boost != 1f) {sq = new SpanBoostQuery(sq, boost);}spanQueries[i++] = sq;}if (spanQueries.length == 1)return spanQueries[0];else return new SpanOrQuery(spanQueries);}

public SpanQuery makeSpanClause ( ) { SpanQuery [ ] spanQueries = new SpanQuery [ size ( ) ] ; Iterator < SpanQuery > sqi = weightBySpanQuery . keySet ( ) . iterator ( ) ; int i = 0 ; while ( sqi . hasNext ( ) ) { SpanQuery sq = sqi . next ( ) ; float boost = weightBySpanQuery . get ( sq ) ; if ( boost != 1f ) { sq = new SpanBoostQuery ( sq , boost ) ; } spanQueries [ i ++ ] = sq ; } if ( spanQueries . length == 1 ) return spanQueries [ 0 ] ; else return new SpanOrQuery ( spanQueries ) ; }
public virtual SpanQuery MakeSpanClause(){List<SpanQuery> spanQueries = new List<SpanQuery>();foreach (var wsq in weightBySpanQuery){wsq.Key.Boost = wsq.Value;spanQueries.Add(wsq.Key);}if (spanQueries.Count == 1)return spanQueries[0];else return new SpanOrQuery(spanQueries.ToArray());}
