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
Transaction Types can optionally link custom search index fields to your transactions for easier querying later.
667
-
A custom_index_field is a dictionary with 'path', 'field_name', 'type', and an optional 'options' dictionary:
668
-
669
-
path (str): the JSONPath of your transaction payload you would like to result form a search on the "key".
670
-
field_name (str): The field for this custom extracted value to be indexed under
671
-
type ('text', 'tag', or 'number'): The type of redisearch index to use for this field
672
-
options: (object) The redisearch options for this field
673
-
- no_index (bool) (all types) whether or not to index on this field, or simply make it sortable only if false
674
-
- separator (str) (tag only) what string should be used for the tag separator
675
-
- weight (number) (text only) The weight to give this text field when doing text queries
676
-
- no_stem (bool) (text only) Whether or not to allow search stemming in text searches on this field
677
-
- sortable (bool) (text and number only) Whether or not a search on the index can be sortable by this field
678
-
See redisearch for more details on these options: https://oss.redislabs.com/redisearch/Commands.html#field_options
679
-
680
693
Args:
681
694
transaction_type (str): transaction_type to update
682
-
custom_index_fields (optional): custom_index_fields to update. Ex.: [{"path":"a.b","field_name":"myField","type":"text","options":{"no_index":True}}]
695
+
custom_index_fields (optional): custom index fields to create. Ex.: ``[{"path":"a.b","field_name":"myField","type":"text","options":{"no_index":True}}]``
696
+
697
+
Transaction Types can optionally link custom search index fields to your transactions for easier querying later.
698
+
A custom_index_field is a dictionary with 'path', 'field_name', 'type', and an optional 'options' dictionary:
699
+
700
+
- path (str): the JSONPath of your transaction payload you would like to result form a search on the "key"
701
+
- field_name (str): The field for this custom extracted value to be indexed under
702
+
- type ('text', 'tag', or 'number'): The type of redisearch index to use for this field
703
+
- options: (object) The redisearch options for this field
704
+
705
+
- no_index (bool) (all types) whether or not to index on this field, or simply make it sortable only if false
706
+
- separator (str) (tag only) what string should be used for the tag separator
707
+
- weight (number) (text only) The weight to give this text field when doing text queries
708
+
- no_stem (bool) (text only) Whether or not to allow search stemming in text searches on this field
709
+
- sortable (bool) (text and number only) Whether or not a search on the index can be sortable by this field
710
+
711
+
See `the redisearch docs <https://oss.redislabs.com/redisearch/Commands.html#field_options>`_ for more details on these options
683
712
684
713
Raises:
685
714
TypeError: with bad parameter types
@@ -691,8 +720,8 @@ def create_transaction_type(
691
720
custom_index_fields= []
692
721
ifnotisinstance(transaction_type, str):
693
722
raiseTypeError('Parameter "transaction_type" must be of type str.')
694
-
ifnotisinstance(custom_index_fields, list):
695
-
raiseTypeError('Parameter "custom_index_fields" must be of type list.')
0 commit comments