You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/search_query_builder.rb
+11-13Lines changed: 11 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -28,16 +28,16 @@ def self.both(field)
28
28
@@search_filter_docs=<<-EOM
29
29
#### Notes
30
30
31
-
The search syntax is the same between the `Card` and `Printing` endpoints aside from some fields that only exist in one or the other.
31
+
The search syntax is the same between the `Card` and `Printing` endpoints aside from some fields that only exist in one or the other.
32
32
33
-
In constructed URLs for calls to the API, ensure that you URL Encode the value to the `filter[search]` argument.
33
+
In constructed URLs for calls to the API, ensure that you URL Encode the value to the `filter[search]` argument.
34
34
35
35
#### Search Query Structure
36
36
37
37
* A search query is a series of one or more conditions separated by one or more spaces (which acts as an implicit `and`) or explicit conjuctions (`and` and `or`):
38
38
* `condition1 condition2 condition3` - gets all cards that meet the requirements of all three conditions
39
-
* Multiple values for a given term can be provided with `|` ( acts as `or`) or `&`.
40
-
* `text:"Runner is tagged"&meat` will return all cards with both `Runner is tagged` and `meat` in their text.
39
+
* Multiple values for a given term can be provided with `|` ( acts as `or`) or `&`.
40
+
* `text:"Runner is tagged"&meat` will return all cards with both `Runner is tagged` and `meat` in their text.
41
41
* `text:"Runner is tagged"|meat` will return all cards with either `Runner is tagged` or `meat` in their text.
42
42
* Each condition must be some or all of the name of a card or a criteria search:
43
43
* `Street` - gets all cards with "Street" in their name
@@ -61,7 +61,7 @@ def self.both(field)
61
61
There are 5 types of fields in the Search Filter:
62
62
63
63
* **Array** - supports the `:` (an element in the array is an exact match) and `!` (an element in the array is not an exact match) operators.
64
-
* `card_pool_ids:eternal|snapshot` returns all cards in the eternal or snapshot card pools.
64
+
* `card_pool_ids:eternal|snapshot` returns all cards in the eternal or snapshot card pools.
65
65
* `card_pool!snapshot` returns all cards not in the snapshot card pool.
66
66
* **Boolean** - supports the `:` (match) and `!` (negated match) operators. `true`, `false`, `t`, `f`, `1`, and `0` are all acceptable values.
67
67
* `advanceable:true`, `advanceable:t`, and `advanceable:1` will all return all results where advanceable is true.
@@ -81,13 +81,13 @@ def self.both(field)
81
81
# Note: this does not yet have arrays of name fields supported due to complications with
82
82
# needing to UNNEST array fields to handle LIKE queries for array field elements.
0 commit comments