Package org.apache.solr.analysis

Examples of org.apache.solr.analysis.TokenizerChain


    for (int i=0; i<nList.getLength(); i++) {
      TokenFilterFactory filt = readTokenFilterFactory(nList.item(i));
      if (filt != null) filters.add(filt);
    }

    return new TokenizerChain(tfac, filters.toArray(new TokenFilterFactory[filters.size()]));
  };
View Full Code Here


  private static SimpleOrderedMap<Object> getAnalyzerInfo(Analyzer analyzer) {
    SimpleOrderedMap<Object> aninfo = new SimpleOrderedMap<Object>();
    aninfo.add("className", analyzer.getClass().getName());
    if (analyzer instanceof TokenizerChain) {
       SimpleOrderedMap<Object> tokenizer = new SimpleOrderedMap<Object>();
         TokenizerChain tchain = (TokenizerChain)analyzer;
         TokenizerFactory tfac = tchain.getTokenizerFactory();
         tokenizer.add("className", tfac.getClass().getName());
         tokenizer.add("args", tfac.getArgs());
         aninfo.add("tokenizer", tokenizer);
         TokenFilterFactory[] filtfacs = tchain.getTokenFilterFactories();
        
        SimpleOrderedMap<Map<String, Object>> filters = new SimpleOrderedMap<Map<String, Object>>();
        for (TokenFilterFactory filtfac : filtfacs) {
           Map<String, Object> tok = new HashMap<String, Object>();
           String className = filtfac.getClass().getName();
View Full Code Here

      charFilters[index].init( getMapOfParameters( charFilterDef.params(), luceneMatchVersion ) );
      if ( charFilters[index] instanceof ResourceLoaderAware ) {
        ( ( ResourceLoaderAware ) charFilters[index] ).inform( resourceLoader );
      }
    }
    return new TokenizerChain( charFilters, tokenFactory, filters );
  }
View Full Code Here

      filters[index].init( getMapOfParameters( filterDef.params() ) );
      if ( filters[index] instanceof ResourceLoaderAware ) {
        ((ResourceLoaderAware)filters[index]).inform( resourceLoader );
      }
    }
    return new TokenizerChain(tokenFactory, filters);
  }
View Full Code Here

    for (int i=0; i<nList.getLength(); i++) {
      TokenFilterFactory filt = readTokenFilterFactory(nList.item(i));
      if (filt != null) filters.add(filt);
    }

    return new TokenizerChain(tfac, filters.toArray(new TokenFilterFactory[filters.size()]));
  };
View Full Code Here

          charFilterDef.params(), luceneMatchVersion
      );
      charFilters[index].init( mapOfParameters );
      injectResourceLoader( charFilters[index], defaultResourceLoader, mapOfParameters );
    }
    return new TokenizerChain( charFilters, tokenFactory, filters );
  }
View Full Code Here

      charFilters[index].init( getMapOfParameters( charFilterDef.params() ) );
      if ( charFilters[index] instanceof ResourceLoaderAware ) {
        ((ResourceLoaderAware)charFilters[index]).inform( resourceLoader );
      }
    }
    return new TokenizerChain( charFilters, tokenFactory, filters );
  }
View Full Code Here

      filters[index].init( getMapOfParameters( filterDef.params() ) );
      if ( filters[index] instanceof ResourceLoaderAware ) {
        ((ResourceLoaderAware)filters[index]).inform( resourceLoader );
      }
    }
    return new TokenizerChain(tokenFactory, filters);
  }
View Full Code Here

          charFilterDef.params(), luceneMatchVersion
      );
      charFilters[index].init( mapOfParameters );
      injectResourceLoader( charFilters[index], defaultResourceLoader, mapOfParameters );
    }
    return new TokenizerChain( charFilters, tokenFactory, filters );
  }
View Full Code Here

    for ( int index = 0 ; index < length ; index++ ) {
      TokenFilterDef filterDef = analyzerDef.filters()[index];
      filters[index] = (TokenFilterFactory) instantiate( filterDef.factory() );
      filters[index].init( getMapOfParameters( filterDef.params() ) );
    }
    return new TokenizerChain(tokenFactory, filters);
  }
View Full Code Here

TOP

Related Classes of org.apache.solr.analysis.TokenizerChain

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.