Package com.dotcms.repackage.org.apache.lucene.analysis.core

Examples of com.dotcms.repackage.org.apache.lucene.analysis.core.SimpleAnalyzer


    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


  }

    public static IndexWriter getWriter ( String companyId, boolean create ) throws IOException {

        Directory directory = FSDirectory.open( new File( getLuceneDir( companyId ) ) );
        IndexWriterConfig config = new IndexWriterConfig( Version.LUCENE_CURRENT, new SimpleAnalyzer( Version.LUCENE_CURRENT ) );

        return new IndexWriter( directory, config );
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.org.apache.lucene.analysis.core.SimpleAnalyzer

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.