Examples of ResultPatternFactory


Examples of net.sf.clairv.search.pattern.ResultPatternFactory

    if (resourceName != null) {
      ResourceSuite suite = (ResourceSuite) resourceMap.get(resourceName);
      try {
        Query query = parseQuery(suite.meta, q, args);
        Hits hits = suite.indexSearcher.search(query);
        ResultPatternFactory factory = suite.resultPatternFactory;
        ResultPattern rp = factory.createResultPattern(suite.meta
            .getHitTextPattern());
        return new LocalLuceneQueryResults(query, hits, rp);
      } catch (ParseException e) {
        log.error("Cannot parse the query. Please check the syntax.");
      } catch (IOException e) {
View Full Code Here

Examples of net.sf.clairv.search.pattern.ResultPatternFactory

            meta.setResourceName(name);
            meta.setSearchableFields(StringUtils.splitStrings(p
                .getProperty("search")));
            resourceNames.add(name);
            IndexReader indexReader = IndexReader.open(loc);
            ResultPatternFactory factory = new ResultPatternFactory(indexReader);
            ResourceSuite suite = new ResourceSuite();
            suite.meta = meta;
            suite.indexSearcher = new IndexSearcher(indexReader);
            suite.resultPatternFactory = factory;
            resourceMap.put(name, suite);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.