BooleanQuery bq=new BooleanQuery();
bq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
NodeList nl = e.getElementsByTagName("Clause");
for(int i=0;i<nl.getLength();i++)
{
Element clauseElem=(Element) nl.item(i);
BooleanClause.Occur occurs=getOccursValue(clauseElem);
//find the first element child which should contain a Query
Element clauseQuery=DOMUtils.getFirstChildElement(clauseElem);
if(clauseQuery!=null)
{
Query q=factory.getQuery(clauseQuery);
bq.add(new BooleanClause(q,occurs));
}
else
{
throw new ParserException("BooleanClause missing child query element ");
}
}
return bq;