ArrayList clausesList=new ArrayList();
for (Node kid = e.getFirstChild(); kid != null; kid = kid.getNextSibling())
{
if (kid.getNodeType() == Node.ELEMENT_NODE)
{
SpanQuery clause=factory.getSpanQuery((Element) kid);
clausesList.add(clause);
}
}
SpanQuery[] clauses=(SpanQuery[]) clausesList.toArray(new SpanQuery[clausesList.size()]);
SpanOrQuery soq = new SpanOrQuery(clauses);
soq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
return soq;