1. Knowledge Base
  2. PeakMetrics Alerts

Advanced Search for Alerts

PeakMetrics supports a wide variety of advanced search tools.

Booleans

By default, we match exact phrases. A search for “immigration rights” will look explicitly for the phrase “immigration rights”.

You can customize this by using:

+ or AND (this term must be present)

example: “immigration rights” +children
“immigration rights” AND children

translates to “immigration rights” and children

| or OR (either term must be present)

example: “immigration rights” | “undocumented rights”
“immigration rights” OR “undocumented rights”

translates to “immigration rights” or “undocumented rights”

-  or NOT (this term must not be present)
example: “immigration rights” -children translates to “immigration rights” but not children

For example, this query:

"quick brown" +fox -news

states that:

  • fox must be present
  • news must not be present
  • quick brown — must be present together

Grouping

Multiple terms or clauses can be grouped together with parentheses, to form sub-queries:

+(quick | brown) +fox

Wildcards

Wildcard searches can be run on individual terms, using ? to replace a single character, and * to replace zero or more characters:

+qu?ck bro*

Use this feature sparingly, as it can take a long time to process results

Fuzziness

We can search for terms that are similar to, but not exactly like our search terms, using the “fuzzy” operator:

quikc~ brwn~ foks~

Proximity searches

While normal searches (eg "john smith" ) expect all of the terms in exactly the same order, a proximity query allows the specified words to be further apart or in a different order. In the same way that fuzzy queries can specify a maximum edit distance for characters in a word, a proximity search allows us to specify a maximum edit distance of words in a phrase:

"fox quick"~5

The closer the text in a field is to the original order specified in the query string, the more relevant that document is considered to be. When compared to the above example query, the phrase "quick fox" would be considered more relevant than "quick brown fox" .

Date Ranges

All days in September 2018:

publish_date:[2018-09-01 TO 2018-09-30]