Class FullText

java.lang.Object
org.umlg.sqlg.predicate.FullText
All Implemented Interfaces:
BiPredicate<String,String>, org.apache.tinkerpop.gremlin.process.traversal.PBiPredicate<String,String>

public class FullText extends Object implements org.apache.tinkerpop.gremlin.process.traversal.PBiPredicate<String,String>
Full text match predicate This is very postgresql oriented: - configuration is whatever was used to create the index - plain is to switch to plainto_tsquery (no need to use operators, etc.)
Author:
jpmoresmau
  • Constructor Details

    • FullText

      public FullText(String configuration, String query, boolean plain)
      full constructor
      Parameters:
      configuration - the full text configuration
      query - the left hand side query if specified
      plain - use plain mode
  • Method Details

    • fullTextMatch

      public static org.apache.tinkerpop.gremlin.process.traversal.P<String> fullTextMatch(String configuration, String value)
      Build full text matching predicate (use in has(column,...))
      Parameters:
      configuration - the full text configuration to use
      value - the value to search for
      Returns:
      the predicate
    • fullTextMatch

      public static org.apache.tinkerpop.gremlin.process.traversal.P<String> fullTextMatch(String configuration, boolean plain, String value)
      Build full text matching predicate (use in has(column,...))
      Parameters:
      configuration - the full text configuration to use
      plain - should we use plain mode?
      value - the value to search for
      Returns:
      the predicate
    • fullTextMatch

      public static org.apache.tinkerpop.gremlin.process.traversal.P<String> fullTextMatch(String configuration, boolean plain, String query, String value)
      Build full text matching predicate (use in where(...))
      Parameters:
      configuration - the full text configuration to use
      plain - should we use plain mode?
      query - the actual query (left hand side)
      value - the value to search for
      Returns:
      the predicate
    • fullTextMatch

      public static org.apache.tinkerpop.gremlin.process.traversal.P<String> fullTextMatch(String configuration, boolean plain, List<String> columns, String value)
      Build full text matching predicate (use in where(...)) Uses several columns for text search. This assumes PostgreSQL and concatenates column names with a space in between just like we would by default build the index
      Parameters:
      configuration - the full text configuration to use
      plain - should we use plain mode?
      columns - the columns to query
      value - the value to search for
      Returns:
      the predicate
    • getConfiguration

      public String getConfiguration()
    • isPlain

      public boolean isPlain()
    • getQuery

      public String getQuery()
    • test

      public boolean test(String first, String second)
      Specified by:
      test in interface BiPredicate<String,String>
    • toString

      public String toString()
      Overrides:
      toString in class Object