Class IndexExpression


  • public class IndexExpression
    extends Expression
    Defines the $indexOfBytes expression
    Since:
    2.0
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Constructor Detail

      • IndexExpression

        public IndexExpression​(String operation,
                               Expression string,
                               Expression substring)
        Creates the new expression
        Parameters:
        operation - the index operation name
        string - the string to search
        substring - the target string
    • Method Detail

      • encode

        public void encode​(Mapper mapper,
                           org.bson.BsonWriter writer,
                           org.bson.codecs.EncoderContext encoderContext)
        Overrides:
        encode in class Expression
        Parameters:
        mapper - the mapper
        writer - the writer
        encoderContext - the context
      • end

        public IndexExpression end​(int end)
        Sets the end boundary for searching
        Parameters:
        end - the end
        Returns:
        this
      • start

        public IndexExpression start​(int start)
        Sets the start boundary for searching
        Parameters:
        start - the start
        Returns:
        this