Skip to content

4. Search text

NikolayHD edited this page Aug 5, 2018 · 62 revisions

Basic examples

llanowar elves yields cards that have either llanowar OR elves in any field
"llanowar elves" in contrast yelds cards that contain both words in exactly same order in some field
name:"llanowar elves" restricts the search to name field only
llanowar AND elves requires both words to be present without restricting the order of words nor requiring them to appear in the same field

Intellisense

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

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

image

Caveats

name: shivan dragon

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

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

Correct queries would be name: "shivan dragon" or name:(shivan OR 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

image

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 OR Type:(Rogue Rat) matches any card of types Rogue OR 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

--------------------------------------+

"dealt damage"~2.5

searches for text where words mana and color have 2 or less words between them

--------------------------------+

Use fractional modifier to allow reverse words order in matched text.

Range search

powerNum:[1 TO 4]

--------------------------------------+

PricingMid:{100 TO *}

--------------------------------------+

Cmc:{0 TO 2]

correctly filters number fields. No power 11 cards will appear between 1 and 4

--------------------------------+

searches cards with price strictly > than 100$

--------------------------------+

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