}
public NodePhraseQuery build(final QueryNode queryNode) throws QueryNodeException {
final TokenizedPhraseQueryNode phraseNode = (TokenizedPhraseQueryNode) queryNode;
final NodePhraseQuery phraseQuery = new NodePhraseQuery();
final List<QueryNode> children = phraseNode.getChildren();
if (children != null) {
for (final QueryNode child : children) {
final NodeTermQuery termQuery = (NodeTermQuery) child
.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
final FieldQueryNode termNode = (FieldQueryNode) child;
phraseQuery.add(termQuery.getTerm(), termNode.getPositionIncrement());
}
}
return phraseQuery;
}