Search

Keyword Search in DecoverAI: The Complete Operator Reference

Boolean operators, phrase matching, proximity, and wildcards — the full reference for the search bar's exact-match mode.

April 11, 2026

DecoverAI's Keyword mode lets you run exact-match searches across your case files using the same Boolean operators you already know from Relativity, Everlaw, and Westlaw. When Keyword is on, we bypass semantic search, embeddings, and AI query rewriting — you get back every document where your terms literally appear, in the combination you asked for, nothing more.

Use Keyword when you want precision. Use Smart (the default) when you want the system to interpret your question and bring back semantically related answers even if they don't share words with your query.

Turning Keyword search on

In the search bar, click the Smart / Keyword toggle and select Keyword. The bar stays in Keyword mode until you switch it back. When Keyword is active, you can paginate through matches and see an exact match count — "About 142 results" rather than a capped preview.

Operator quick reference

You typeWhat it does
john ruffinoBoth words must appear (implicit AND)
john AND ruffinoSame as above, explicit
john OR janeEither word appears
john, janeComma is a shortcut for OR
john NOT ruffino'john' must appear, 'ruffino' must not
(john OR jane) AND depositionParentheses group expressions
"expert witness"Exact phrase match (words in order, adjacent)
"expert witness"~3Proximity: within 3 words of each other, in order
deposit*Wildcard: deposit, deposition, depositions, etc.
wom?nSingle-character wildcard: woman, women
john W/3 ruffinoNEAR: within 3 words of each other, any order
john W/5 james W/5 ruffinoNEAR chain: all three within 5 words of each other

Operator details

Boolean operators

  • AND, OR, NOT must be uppercase. Lowercase 'and' is just a regular word. This matches the rule most legal platforms use.
  • Space-separated terms are joined with AND — john ruffino behaves the same as john AND ruffino.
  • A comma is a shortcut for OR — motion, order returns anything containing either word.
  • You cannot start a query with NOT and you cannot combine OR with NOT (a OR NOT b is rejected) — both match Relativity's rules.
  • AND binds tighter than OR, so A AND B OR C is parsed as (A AND B) OR C.
  • Use parentheses when you want a different grouping: A AND (B OR C).

Phrases and proximity

  • Wrap a multi-word expression in double quotes to match it exactly: "expert witness report".
  • Append ~N to a phrase for proximity: "breach duty"~5 finds the two words within 5 positions of each other while preserving the left-to-right order.
  • Proximity with ~N is per-phrase only: "a b"~3 AND c cannot loosen the AND, it only loosens the phrase.

Wildcards

  • * matches zero or more characters.
  • ? matches exactly one character.
  • Leading wildcards (*tract, ?onsent) are rejected — they force an expensive full-index scan and are blocked by most search engines including OpenSearch, Lucene, and SQL full-text.
  • Wildcards can appear inside terms too: col*r matches color and colour; g?n matches gun, gin, gen.

NEAR (W/N) — proximity with flexible order

NEAR is the operator to reach for when two or more words should appear near each other but you don't care which comes first. This is how Relativity, Westlaw, and LexisNexis users are used to finding things like 'breach somewhere near duty'.

  • Write term W/N term where N is the maximum number of words between them. Order doesn't matter — john W/3 ruffino matches both 'John P. Ruffino' and 'Ruffino, John'.
  • Chain with repeated W/N for three or more terms: breach W/5 duty W/5 care finds all three within a 5-word window of each other.
  • NEAR binds tighter than AND, so foo W/3 bar AND baz is read as (foo W/3 bar) AND baz — first find foo/bar close together, then require baz anywhere in the same document.
  • NEAR operands must be plain terms or wildcard terms. You cannot put a quoted phrase on either side of W/N.

Worked examples

Find every doc where both names appear:
john ruffino
Find the exact phrase 'medical expert report':
"medical expert report"
Find documents mentioning either attorney, but only within Depositions:
(smith OR jones) deposition
Find documents where 'breach' and 'duty' appear within 5 words of each other, any order:
breach W/5 duty
Find any variation of 'deposition' alongside 'objection' within 10 words:
deposit* W/10 objection
Exclude documents that mention settlement:
damages NOT settlement
Find paragraphs where 'ischemic' and 'stroke' appear close together in any order, anywhere in the same document with the phrase 'cognitive disability':
ischemic W/3 stroke AND "cognitive disability"

Results, pagination, and counts

  • Results appear as a flat list, grouped by chunk. Each result links directly to the document viewer at the right page.
  • The header shows an exact match count ('About 142 results'), not a sentinel — this number reflects every matching chunk across the whole case, not just the current page.
  • Each result card shows a per-document match badge — e.g., '3 hits in this document' — so you can see at a glance which files are the densest matches.
  • Use the page controls at the bottom to jump forward and back; Keyword search supports jump-to-page, unlike Smart search which streams results.

Tips and gotchas

  • Keyword search is case-insensitive for your terms but case-sensitive for operators. john AND mary works; john and mary treats 'and' as a word.
  • If your query has a typo — unmatched parenthesis, unterminated quote, stray W/3 — the search bar shows an inline error pointing at the column where the parser got stuck.
  • NEAR is usually cheaper than a loose AND when you're looking for a concept like 'cause of action' that might not appear as an exact phrase. Try cause W/3 action before widening the net.
  • Wildcards anchor on the left — contract* is fast, *tract is rejected. If you need to match a suffix, restate it: subcontract* OR contract*.
  • Keyword search does not rewrite your query. If you search for M&A and your documents use 'mergers and acquisitions', switch to Smart mode or add both spellings with OR.

Not supported (yet)

  • Fuzzy matching (~ after a bare term, as in stein~1)
  • Regular expressions (/regex/)
  • Field-scoped search (e.g., title:foo)
  • Sentence / paragraph proximity (/s, /p in Westlaw)

If your workflow needs one of these, let the DecoverAI team know and we'll prioritize it.

Frequently Asked Questions

When should I use keyword search instead of AI review in DecoverAI?

Keyword search is the right tool when you need exact-match results — when the presence or absence of a specific term, phrase, or pattern is the legal question. Use it for privilege screenings requiring specific attorney names, regulatory compliance searches requiring exact statutory terms, and identification of documents mentioning specific transactions or parties. AI-powered review is better for responsiveness decisions where the concept matters more than specific wording.

What is the difference between a proximity operator and phrase search?

A phrase search (using quotes) requires words to appear adjacent in exactly that order. A proximity operator — w/5 for "within 5 words" or pre/5 for "preceding within 5 words" — requires words to appear near each other but allows other words in between. "settlement agreement" finds that exact phrase; settlement w/5 agreement finds "settlement of the indemnity agreement" and similar variants where the words are separated.

How do wildcard operators work in keyword search?

The asterisk (*) wildcard substitutes for zero or more characters at the end of a word root. fraud* finds fraud, fraudulent, fraudulently, and fraudulence. The question mark (?) substitutes for exactly one character — wom?n finds woman and women. Wildcards capture spelling variants and word forms without listing every alternative, but require a root specific enough not to generate excessive unrelated hits.

Can I limit a keyword search to a specific metadata field in DecoverAI?

Yes. Field-scoped search restricts a query to a single metadata field. from:counsel@firm.com limits results to emails from that address. subject:"board resolution" limits results to documents with that phrase in the subject. You can combine field-scoped terms with Boolean operators: (from:ravi OR from:amin) AND subject:acquisition finds emails from either sender with "acquisition" in the subject line.

Ready to search your case files with precision and intelligence?

See how DecoverAI combines exact-match Keyword search with semantic Smart search in one workspace.

Book a Demo →