Skip to content

Searching

Kevin Day edited this page Feb 15, 2023 · 7 revisions

SAGE offers different ways to search using different search algorithms chosen by the manager of a Discovery View.

Case Sensitivity

When something is case-sensitive, then the upper case or lower case equivalent characters are treated as different. When something is case-insensitive, then the upper case and lower case equivalent characters are treated as the same.

The search behavior follows the case-insensitive practice. That is to say the search words APPLE, Apple, apple, and aPPLe are all treated the as the same exact word when searching.

The Query Parsers

Query parsers provide more advanced control over how searching is performed when attempting to match the requested keywords. The particular query parser used is determined by the manager who created the Discovery View.

Screenshot of Query Parser Field

There are three different parsers.

  1. Standard Query Parser (Lucene)
  2. DisMax Query Parser (Dismax)
  3. Extended DisMax Query Parser (Edismax)

The Standard Query Parser (Lucene) is a robust and intuitive parser with a downside of being picky about syntax.

The DisMax Query Parser (Dismax) is a parser designed around searching and matching phrases without requiring complex syntax and has no wild card support.

The Extended DisMax Query Parser (Edismax) is a parser a variant of the Dismax parser that brings in the syntax of the Lucene parser allowing for wild card support.

Some of the common syntax for the Lucene and Edismax parsers:

  • Boolean operators such as AND (+, &&), OR (||), NOT (-) for combining words, such as My OR apple and My AND apple.
  • Positive and negative queries, such as +apple or -apple where the + means with and - means without.
  • The following special characters must be escaped (using a backslash \) to match: + - && || ! ( ) { } [ ] ^ " ~ * ? : / (Escaping the ! would look like \!).
  • Terms can be grouped using the parenthesis, such as Apple OR (my AND red) to match either apple or both the words "my" and "red".

The Default Operand

The operand determines how to interpet spaces between words.

Screenshot of Operand Field

There are two operands available:

  1. OR
  2. AND

The OR operand works by treated spaces as an or condition. For example, searching for "My Apple" could find particular titles such as:

  • My red apple
  • My apple
  • Blue apple
  • My orange

This works because the search is for the word My or the word Apple.

The most command behavior in search engines is to use the OR operand.

The AND operand works by treated spaces as an and condition. For example, searching for "My Apple" could find particular titles such as:

  • My apple

This works because the search is for the word My and the word Apple.

Additional Resources

The technical documentation for the Solr Core Parsers: