Help:Wildcard Semantic Search

From BugSigDB

Query forms allow a wildcard search mode for text fields.

In the wildcard search mode, we can use a word or partial word as a search pattern.

Wildcard search operators[edit source]

To trigger the wildcard search mode, start your input with ~ (tilde). You then add an * (asterisk) mask symbol to search any sequence of characters before and/or after the search pattern.

For example:

  • ~*cancer = ends with "cancer"
  • ~cancer* = starts with "cancer"
  • ~*cancer* = contains "cancer"

Unlike * which stands for an arbitrary sequence of characters, ? (question mark) stands for a single character.

To exclude certain values use the ! (exclamation mark) operator:

  • ~*cancer AND !breast cancer = ends with "cancer" but not equal to "breast cancer"

You can also combine the ! operator with the wildcard search operator:

  • ~*cancer AND !~o* = ends with "cancer" but doesn't start with "o" (excludes ovarian cancer and others starting with "o").

Tip: Use !~ only in an AND clause with another pattern to avoid huge (and useless) result sets.