Package com.dotcms.repackage.org.apache.lucene.queryparser.classic

Examples of com.dotcms.repackage.org.apache.lucene.queryparser.classic.QueryParser


    if (Validator.isNotNull(text)) {
      if (text.indexOf(StringPool.SPACE) == -1) {
        text = KeywordsUtil.toWildcard(text);
      }

      QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, field, new SimpleAnalyzer(Version.LUCENE_CURRENT));
      Query query = parser.parse(text);

      booleanQuery.add(query, BooleanClause.Occur.SHOULD);
    }
  }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.lucene.queryparser.classic.QueryParser

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.