Package org.apache.lucene.analysis.util

Examples of org.apache.lucene.analysis.util.AbstractAnalysisFactory


    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return e.g. a charfilter here: but a tokenizer could wrap a filter around it
        assertFalse(mtc instanceof CharFilterFactory);
      }
     
View Full Code Here


    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return a charfilter or tokenizer here, this makes no sense
        assertTrue(mtc instanceof TokenFilterFactory);
      }
     
View Full Code Here

    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return a tokenizer or tokenfilter here, this makes no sense
        assertTrue(mtc instanceof CharFilterFactory);
      }
     
View Full Code Here

      ctor = factoryClazz.getConstructor(Map.class);
    } catch (Exception e) {
      throw new RuntimeException("factory '" + factoryClazz + "' does not have a proper ctor!");
    }
   
    AbstractAnalysisFactory factory = null;
    try {
      factory = ctor.newInstance(args);
    } catch (InstantiationException e) {
      throw new RuntimeException(e);
    } catch (IllegalAccessException e) {
View Full Code Here

        }
      }
      if (!argMap.containsKey("luceneMatchVersion")) {
        argMap.put("luceneMatchVersion", Version.LUCENE_CURRENT.toString());
      }
      final AbstractAnalysisFactory instance;
      try {
        instance = clazz.getConstructor(Map.class).newInstance(argMap);
      } catch (Exception e) {
        throw new RuntimeException("Line #" + lineno(stok) + ": ", e);
      }
View Full Code Here

    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return e.g. a charfilter here: but a tokenizer could wrap a filter around it
        assertFalse(mtc instanceof CharFilterFactory);
      }
     
View Full Code Here

    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return a charfilter or tokenizer here, this makes no sense
        assertTrue(mtc instanceof TokenFilterFactory);
      }
     
View Full Code Here

    if (factory != null) {
      // we managed to fully create an instance. check a few more things:
     
      // if it implements MultiTermAware, sanity check its impl
      if (factory instanceof MultiTermAwareComponent) {
        AbstractAnalysisFactory mtc = ((MultiTermAwareComponent) factory).getMultiTermComponent();
        assertNotNull(mtc);
        // its not ok to return a tokenizer or tokenfilter here, this makes no sense
        assertTrue(mtc instanceof CharFilterFactory);
      }
     
View Full Code Here

      ctor = factoryClazz.getConstructor(Map.class);
    } catch (Exception e) {
      throw new RuntimeException("factory '" + factoryClazz + "' does not have a proper ctor!");
    }
   
    AbstractAnalysisFactory factory = null;
    try {
      factory = ctor.newInstance(args);
    } catch (InstantiationException e) {
      throw new RuntimeException(e);
    } catch (IllegalAccessException e) {
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.util.AbstractAnalysisFactory

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.