Interface ScoredTextFieldOperation<T>

  • Type Parameters:
    T -

    public interface ScoredTextFieldOperation<T>
    Scored text field operations allows to build Google like queries.
    See Also:
    This is a public API.
    • Method Detail

      • query

        ScoredFilter<T> query​(String query)

        Allows to build Google like searches. The returned result hits are by default ordered by score (best fit first). Note, some result may not match the complete query string but may also be relevant.


         List<Dossier> result =
        This will return all dossiers that contain the words Axon and Ivy but also dossiers where Ivy is not spelled correct (e.g. Ivi, Ify, etc).

        Query Syntax:

        By default at least one of the given words in the query string must be available (OR operation). E.g Axon Ivy means Axon or Ivy has to be in the business data value. The value that contains all words are scored higher than the value that misses one of the words.

        You can use the following operators inside the query string:

        +The value should contain the word.+Axon +Ivy"Hello Axon and Ivy"
        |Or operation. The value should contain at least one of the words.Axon | Ivy"Hello Axon and Ivy", "Hello Axon", "Ivy is great"
        -Not operation. Negates the following expression.-Ivy"Hello Axon"
        ""The value should contain all words in the quotes and they should stand adjacent."Axon Ivy""Hello Axon Ivy. How are you"
        *The value should contain a word that starts with the given prefix.Ax*"Axon.ivy", "This is an axiom"
        ()Defines precedence.+Axon +(Ivy | Vibe)"Axon.ivy", "Axon Vibe"
        ~NThe value should contain the word. Also misspelled words are matched.
        The number defines how many characters can be misspelled.
        ~NDefines the distance the given words in the phrase can be separate from each other."Axon Ivy"~2"Hello Axon and Ivy. How are you"

        query - the query string
        limit, orderBy or execute operations
        This public API is available in IvyScript and Java. It has the visibility ADVANCED.