Package org.apache.lucene.queryparser.flexible.core.parser

Examples of org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser


*
*/
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");
View Full Code Here

TOP

Related Classes of org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.