Package org.apache.lucene.analysis.payloads

Examples of org.apache.lucene.analysis.payloads.FloatEncoder


  }

  public void inform(ResourceLoader loader) {
    String encoderClass = args.get(ENCODER_ATTR);
    if (encoderClass.equals("float")){
      encoder = new FloatEncoder();
    } else if (encoderClass.equals("integer")){
      encoder = new IntegerEncoder();
    } else if (encoderClass.equals("identity")){
      encoder = new IdentityEncoder();
    } else {
View Full Code Here


  }

  public void inform(ResourceLoader loader) {
    String encoderClass = args.get(ENCODER_ATTR);
    if (encoderClass.equals("float")){
      encoder = new FloatEncoder();
    } else if (encoderClass.equals("integer")){
      encoder = new IntegerEncoder();
    } else if (encoderClass.equals("identity")){
      encoder = new IdentityEncoder();
    } else {
View Full Code Here

    String encoderClass = args.get(ENCODER_ATTR);
    if (encoderClass == null) {
      throw new IllegalArgumentException("Parameter " + ENCODER_ATTR + " is mandatory");
    }
    if (encoderClass.equals("float")){
      encoder = new FloatEncoder();
    } else if (encoderClass.equals("integer")){
      encoder = new IntegerEncoder();
    } else if (encoderClass.equals("identity")){
      encoder = new IdentityEncoder();
    } else {
View Full Code Here

  }

  public void inform(ResourceLoader loader) {
    String encoderClass = args.get( ENCODER_ATTR );
    if ( encoderClass.equals( "float" ) ) {
      encoder = new FloatEncoder();
    }
    else if ( encoderClass.equals( "integer" ) ) {
      encoder = new IntegerEncoder();
    }
    else if ( encoderClass.equals( "identity" ) ) {
View Full Code Here

  public final TokenStream tokenStream(String fieldName, Reader reader) {
    // If this is the topics field, then need to use the notation of "p1$0.45"
    if (fieldName.matches("topicspayload.*")){
      return new DelimitedPayloadTokenFilter(
              new WhitespaceTokenizer(Version.LUCENE_35, reader),
              '$', new FloatEncoder());
    }
    // else, this is a "code" field
    return STANDARD.tokenStream(fieldName, reader);
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.analysis.payloads.FloatEncoder

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.