*
*/
public class TestSpanQueryParserSimpleSample extends LuceneTestCase {
public void testBasicDemo() throws Exception {
SyntaxParser queryParser = new StandardSyntaxParser();
// convert the CharSequence into a QueryNode tree
QueryNode queryTree = queryParser.parse("body:text", null);
// create a config handler with a attribute used in
// UniqueFieldQueryNodeProcessor
QueryConfigHandler spanQueryConfigHandler = new SpansQueryConfigHandler();
spanQueryConfigHandler.set(SpansQueryConfigHandler.UNIQUE_FIELD, "index");