private static void add(BooleanQuery.Builder q,String name,String value,float boost){
  Query tq=new TermQuery(new Term(name,value));
  q.add(new BooleanClause(new BoostQuery(tq,boost),BooleanClause.Occur.SHOULD));
}

private static void add ( BooleanQuery . Builder q , String name , String value , float boost ) { Query tq = new TermQuery ( new Term ( name , value ) ) ; q . add ( new BooleanClause ( new BoostQuery ( tq , boost ) , BooleanClause . Occur . SHOULD ) ) ; }
add a clause to a boolean query .
