java.lang.Object
org.elasticsearch.common.lucene.BytesRefs

public class BytesRefs extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.lucene.util.BytesRef
    checkIndexableLength(org.apache.lucene.util.BytesRef input)
    Checks that the input is not longer than IndexWriter.MAX_TERM_LENGTH
    static org.apache.lucene.util.BytesRef
    Converts an object value to BytesRef.
    static String
    Converts a value to a string, taking special care if its a BytesRef to call BytesRef.utf8ToString().

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BytesRefs

      public BytesRefs()
  • Method Details

    • toString

      public static String toString(Object value)
      Converts a value to a string, taking special care if its a BytesRef to call BytesRef.utf8ToString().
    • toBytesRef

      public static org.apache.lucene.util.BytesRef toBytesRef(Object value)
      Converts an object value to BytesRef.
    • checkIndexableLength

      public static org.apache.lucene.util.BytesRef checkIndexableLength(org.apache.lucene.util.BytesRef input)
      Checks that the input is not longer than IndexWriter.MAX_TERM_LENGTH
      Parameters:
      input - a BytesRef
      Returns:
      the same BytesRef, if no exception has been thrown
      Throws:
      IllegalArgumentException - if the input is too long