Skip to content

4. Search bar

NikolayHD edited this page Apr 26, 2024 · 7 revisions

Basic examples

llanowar elves yields cards that have both llanowar and elves in a field, same or different
"llanowar elves" yelds cards that contain both words in specified order in the same field
name:"llanowar elves" restricts the search to name field only
llanowar OR elves yields cards that have either llanovar or elves or both in any field

Intellisense

Hit Ctrl + Space within search bar to get a list of suggested values.

The hint shows possible field names and known values for the field you specified

../raw/master/out/help/s/search_intellisense.jpg

Auto apply changes

Search bar applies changes 1 second after you stop typing. This can be turned on / off:

../raw/master/out/help/l/search_apply_config.jpg

Caveats

name: shivan dragon

will not search cards with name shivan dragon because the query is equivalent to name: shivan AND *:dragon where * means any field.

Each unquoted word is a separate term joined to others by AND unless you write OR between them.

Correct queries would be name: "shivan dragon", name:(shivan AND dragon) equivalent to a shorter name:(shivan dragon)

angel will not match words like angelic. Use wildcards * and ? to search by partial word, e.g. angel*
  Search is case-INsensitive. However boolean operators AND OR NOT must be written uppercase.

Search by keyword ability

keywords: "deal damage"

Filter buttons above search input do the same but provide far less keywords.

Values containing whitespace must be quoted.

Search similar cards

like: displace

Search cards similar to a given another card. Cards are compared by Text and GeneratedMana fields.

Colon must be followed by a card name

like: "thalia's lieutenant" Name containing whitespace must be quoted "
like: "predator ooze" ~0.75 To reduce or increase count of cards in search result change similarity in slop modifier, e.g. ~0.8. Default is 0.6.

Instead of typing the query manually, click the button on top-right corner of card image.

The query will be added to search input.

Search result is ordered to show most similar cards first unless it is sorted by some card fields

../raw/master/out/help/s/like_query.jpg

More syntax details

Query language used in search text is Lucene.

feature example comment
Boolean operators and nesting ((angel OR demon) AND legendary)  
Search in a specific field Name:Ooze  
Searh in any field disk  
Search the entire phrase "Llanowar elves" using quotes
Default operator is AND Type:(Rogue Rat) matches a card of both types Rogue and Rat
* means 0 or more characters Subtype:(*ngel OR dem* OR human) control whether you search by word's prefix, suffix or you need exact word
? means any one character su????* searches a word starting with su that has at least 6 characters
Search by regular expression nameen:/[ab]nge.{1,2}|demon/ forward slashes / delimit regular expression
Search by approximate spelling neviniral~ returns NevinYrral's Disk and other cards mentioning Nevinyrral in text
Desired minimum similarity
neviniral~0.2
neviniral~0.9
default similarity is 0.5 min is 0, max is 1
Proximity search "Mana color"~2 searches for text where words mana and color have 2 or less words between them
  "dealt damage"~2.5 Use fractional modifier to allow reverse words order in matched text.
Range search powerNum:[1 TO 4] correctly filters number fields. No power 11 cards will appear between 1 and 4
  PricingMid:{100 TO *} searches cards with price strictly > than 100$
  Cmc:{0 TO 2]

curly brace { makes non- inclusive boundary. square ] brace makes it inclusive:

0 < ManaCost <= 2

Range search with text Name:[a TO ced] any word which lies between 'a' and 'ced' in alphanumerical order
Term boosting Angel^3 OR Demon booster ^3 affects search result sort order. It multiplies relevance for angel matches by 3

Complex phrase query

In addition to basic Lucene query syntax, complex phrases are allowed:

text: "/counters?/ (on OR from) it" First word in a phrase is defined by a regular expression subquery, second by a boolean subquery. Third word it is defined like in regular phrase.
text: "/counters?/ (on OR from) it"~2 Modifier ~2 allows up to 2 words between phrase terms.
text: "/deal(s|t)?/ damage"~0.5 Use fractional modifier to allow reverse order of words in matched text.

Search input keyboard shortcuts

result action
show intellisense Ctrl+SPACE or Down
select value from intellisense Up/Down arrows to choose, ENTER to select
hide intellisense ESC
apply modified query ENTER or wait 1 second
Intellisense on field name Ctrl+SPACE when caret is to the left of :
  Ctrl+SPACE when search text is empty
Intellisense on value Type something, press Ctrl+SPACE
Intellisense on specific field's value Type field name, type :, hit Ctrl+SPACE
Cycle field value alphabetically without intellisense menu
Move cursor to the field value to be cycled
Alt+ Down to replace with next value
Alt+ Up to replace with previous value
Erase one word Ctrl+Backspace
Undo Ctrl+Z or Alt+Left
Redo Ctrl+Y or Alt+Right
Clone this wiki locally