Repository: googleforgames/open-match
Pull request #790 (2019-09-06 23:45:29)

Rename Filter to FloatRangeFilter
This sets things up for other filter types.


Patch:
diff --git a/api/backend.swagger.json b/api/backend.swagger.json
index 42920c30..192e023a 100644
--- a/api/backend.swagger.json
+++ b/api/backend.swagger.json
@@ -154,7 +154,7 @@
         }
       }
     },
-    "apiFilter": {
+    "apiFloatRangeFilter": {
       "type": "object",
       "properties": {
         "attribute": {
@@ -172,7 +172,7 @@
           "description": "Minimum value. Defaults to 0."
         }
       },
-      "description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
+      "title": "Filters numerical values to only those within a range.\n  attribute: \"foo\"\n  max: 10\n  min: 5\nmatches:\n  {\"foo\": 5}\n  {\"foo\": 7.5}\n  {\"foo\": 10}\ndoes not match:\n  {\"foo\": 4}\n  {\"foo\": 10.01}\n  {\"foo\": \"7.5\"}\n  {\"foo\": true}\n  {\"foo\": [7.5]}\n  {}"
     },
     "apiFunctionConfig": {
       "type": "object",
@@ -269,10 +269,10 @@
           "type": "string",
           "description": "A developer-chosen human-readable name for this Pool."
         },
-        "filters": {
+        "float_range_filters": {
           "type": "array",
           "items": {
-            "$ref": "#/definitions/apiFilter"
+            "$ref": "#/definitions/apiFloatRangeFilter"
           },
           "description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
         }
diff --git a/api/matchfunction.swagger.json b/api/matchfunction.swagger.json
index 0dcc5a88..aca0952f 100644
--- a/api/matchfunction.swagger.json
+++ b/api/matchfunction.swagger.json
@@ -77,7 +77,7 @@
       },
       "description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
     },
-    "apiFilter": {
+    "apiFloatRangeFilter": {
       "type": "object",
       "properties": {
         "attribute": {
@@ -95,7 +95,7 @@
           "description": "Minimum value. Defaults to 0."
         }
       },
-      "description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
+      "title": "Filters numerical values to only those within a range.\n  attribute: \"foo\"\n  max: 10\n  min: 5\nmatches:\n  {\"foo\": 5}\n  {\"foo\": 7.5}\n  {\"foo\": 10}\ndoes not match:\n  {\"foo\": 4}\n  {\"foo\": 10.01}\n  {\"foo\": \"7.5\"}\n  {\"foo\": true}\n  {\"foo\": [7.5]}\n  {}"
     },
     "apiMatch": {
       "type": "object",
@@ -168,10 +168,10 @@
           "type": "string",
           "description": "A developer-chosen human-readable name for this Pool."
         },
-        "filters": {
+        "float_range_filters": {
           "type": "array",
           "items": {
-            "$ref": "#/definitions/apiFilter"
+            "$ref": "#/definitions/apiFloatRangeFilter"
           },
           "description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
         }
diff --git a/api/messages.proto b/api/messages.proto
index c582e242..7a41a232 100644
--- a/api/messages.proto
+++ b/api/messages.proto
@@ -52,9 +52,22 @@ message Assignment {
   google.rpc.Status error = 3;
 }
 
-// A hard filter used to query a subset of Tickets meeting the filtering
-// criteria.
-message Filter {
+// Filters numerical values to only those within a range.
+//   attribute: "foo"
+//   max: 10
+//   min: 5
+// matches:
+//   {"foo": 5}
+//   {"foo": 7.5}
+//   {"foo": 10}
+// does not match:
+//   {"foo": 4}
+//   {"foo": 10.01}
+//   {"foo": "7.5"}
+//   {"foo": true}
+//   {"foo": [7.5]}
+//   {}
+message FloatRangeFilter {
   // Name of the ticket attribute this Filter operates on.
   string attribute = 1;
 
@@ -71,7 +84,7 @@ message Pool {
 
   // Set of Filters indicating the filtering criteria. Selected players must
   // match every Filter.
-  repeated Filter filters = 2;
+  repeated FloatRangeFilter float_range_filters = 2;
 }
 
 // A Roster is a named collection of Ticket IDs. It exists so that a Tickets
diff --git a/api/mmlogic.swagger.json b/api/mmlogic.swagger.json
index 261cc017..3b495fb4 100644
--- a/api/mmlogic.swagger.json
+++ b/api/mmlogic.swagger.json
@@ -77,7 +77,7 @@
       },
       "description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
     },
-    "apiFilter": {
+    "apiFloatRangeFilter": {
       "type": "object",
       "properties": {
         "attribute": {
@@ -95,7 +95,7 @@
           "description": "Minimum value. Defaults to 0."
         }
       },
-      "description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
+      "title": "Filters numerical values to only those within a range.\n  attribute: \"foo\"\n  max: 10\n  min: 5\nmatches:\n  {\"foo\": 5}\n  {\"foo\": 7.5}\n  {\"foo\": 10}\ndoes not match:\n  {\"foo\": 4}\n  {\"foo\": 10.01}\n  {\"foo\": \"7.5\"}\n  {\"foo\": true}\n  {\"foo\": [7.5]}\n  {}"
     },
     "apiPool": {
       "type": "object",
@@ -104,10 +104,10 @@
           "type": "string",
           "description": "A developer-chosen human-readable name for this Pool."
         },
-        "filters": {
+        "float_range_filters": {
           "type": "array",
           "items": {
-            "$ref": "#/definitions/apiFilter"
+            "$ref": "#/definitions/apiFloatRangeFilter"
           },
           "description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
         }
diff --git a/examples/demo/components/director/director.go b/examples/demo/components/director/director.go
index 0c4a5d37..63c44a31 100644
--- a/examples/demo/components/director/director.go
+++ b/examples/demo/components/director/director.go
@@ -91,7 +91,7 @@ func run(ds *components.DemoShared) {
 					Pools: []*pb.Pool{
 						{
 							Name: "Everyone",
-							Filters: []*pb.Filter{
+							FloatRangeFilters: []*pb.FloatRangeFilter{
 								{
 									Attribute: "mode.demo",
 									Min:       -100,
diff --git a/internal/filter/filter.go b/internal/filter/filter.go
index 284a4355..bc821ccb 100644
--- a/internal/filter/filter.go
+++ b/internal/filter/filter.go
@@ -23,7 +23,7 @@ import (
 )
 
 // Filter returns all of the passed tickets which are included by all the passed filters.
-func Filter(tickets []*pb.Ticket, filters []*pb.Filter) []*pb.Ticket {
+func Filter(tickets []*pb.Ticket, filters []*pb.FloatRangeFilter) []*pb.Ticket {
 	var result []*pb.Ticket
 
 	for _, t := range tickets {
@@ -36,7 +36,7 @@ func Filter(tickets []*pb.Ticket, filters []*pb.Filter) []*pb.Ticket {
 }
 
 // InFilters returns if the given ticket is included in all of the passed filters.
-func InFilters(ticket *pb.Ticket, filters []*pb.Filter) bool {
+func InFilters(ticket *pb.Ticket, filters []*pb.FloatRangeFilter) bool {
 	for _, f := range filters {
 		if !InFilter(ticket, f) {
 			return false
@@ -46,7 +46,7 @@ func InFilters(ticket *pb.Ticket, filters []*pb.Filter) bool {
 }
 
 // InFilter returns if the given ticket is included in the given filter.
-func InFilter(ticket *pb.Ticket, filter *pb.Filter) bool {
+func InFilter(ticket *pb.Ticket, filter *pb.FloatRangeFilter) bool {
 	if ticket.GetProperties().GetFields() == nil {
 		return false
 	}
diff --git a/pkg/pb/messages.pb.go b/pkg/pb/messages.pb.go
index 996b4a60..cdbec08b 100644
--- a/pkg/pb/messages.pb.go
+++ b/pkg/pb/messages.pb.go
@@ -149,9 +149,22 @@ func (m *Assignment) GetError() *status.Status {
 	return nil
 }
 
-// A hard filter used to query a subset of Tickets meeting the filtering
-// criteria.
-type Filter struct {
+// Filters numerical values to only those within a range.
+//   attribute: "foo"
+//   max: 10
+//   min: 5
+// matches:
+//   {"foo": 5}
+//   {"foo": 7.5}
+//   {"foo": 10}
+// does not match:
+//   {"foo": 4}
+//   {"foo": 10.01}
+//   {"foo": "7.5"}
+//   {"foo": true}
+//   {"foo": [7.5]}
+//   {}
+type FloatRangeFilter struct {
 	// Name of the ticket attribute this Filter operates on.
 	Attribute string `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"`
 	// Maximum value. Defaults to positive infinity (any value above minv).
@@ -163,46 +176,46 @@ type Filter struct {
 	XXX_sizecache        int32    `json:"-"`
 }
 
-func (m *Filter) Reset()         { *m = Filter{} }
-func (m *Filter) String() string { return proto.CompactTextString(m) }
-func (*Filter) ProtoMessage()    {}
-func (*Filter) Descriptor() ([]byte, []int) {
+func (m *FloatRangeFilter) Reset()         { *m = FloatRangeFilter{} }
+func (m *FloatRangeFilter) String() string { return proto.CompactTextString(m) }
+func (*FloatRangeFilter) ProtoMessage()    {}
+func (*FloatRangeFilter) Descriptor() ([]byte, []int) {
 	return fileDescriptor_cb9fb1f207fd5b8c, []int{2}
 }
 
-func (m *Filter) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Filter.Unmarshal(m, b)
+func (m *FloatRangeFilter) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_FloatRangeFilter.Unmarshal(m, b)
 }
-func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Filter.Marshal(b, m, deterministic)
+func (m *FloatRangeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_FloatRangeFilter.Marshal(b, m, deterministic)
 }
-func (m *Filter) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Filter.Merge(m, src)
+func (m *FloatRangeFilter) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_FloatRangeFilter.Merge(m, src)
 }
-func (m *Filter) XXX_Size() int {
-	return xxx_messageInfo_Filter.Size(m)
+func (m *FloatRangeFilter) XXX_Size() int {
+	return xxx_messageInfo_FloatRangeFilter.Size(m)
 }
-func (m *Filter) XXX_DiscardUnknown() {
-	xxx_messageInfo_Filter.DiscardUnknown(m)
+func (m *FloatRangeFilter) XXX_DiscardUnknown() {
+	xxx_messageInfo_FloatRangeFilter.DiscardUnknown(m)
 }
 
-var xxx_messageInfo_Filter proto.InternalMessageInfo
+var xxx_messageInfo_FloatRangeFilter proto.InternalMessageInfo
 
-func (m *Filter) GetAttribute() string {
+func (m *FloatRangeFilter) GetAttribute() string {
 	if m != nil {
 		return m.Attribute
 	}
 	return ""
 }
 
-func (m *Filter) GetMax() float64 {
+func (m *FloatRangeFilter) GetMax() float64 {
 	if m != nil {
 		return m.Max
 	}
 	return 0
 }
 
-func (m *Filter) GetMin() float64 {
+func (m *FloatRangeFilter) GetMin() float64 {
 	if m != nil {
 		return m.Min
 	}
@@ -214,10 +227,10 @@ type Pool struct {
 	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 	// Set of Filters indicating the filtering criteria. Selected players must
 	// match every Filter.
-	Filters              []*Filter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
-	XXX_unrecognized     []byte    `json:"-"`
-	XXX_sizecache        int32     `json:"-"`
+	FloatRangeFilters    []*FloatRangeFilter `protobuf:"bytes,2,rep,name=float_range_filters,json=floatRangeFilters,proto3" json:"float_range_filters,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
+	XXX_unrecognized     []byte              `json:"-"`
+	XXX_sizecache        int32               `json:"-"`
 }
 
 func (m *Pool) Reset()         { *m = Pool{} }
@@ -252,9 +265,9 @@ func (m *Pool) GetName() string {
 	return ""
 }
 
-func (m *Pool) GetFilters() []*Filter {
+func (m *Pool) GetFloatRangeFilters() []*FloatRangeFilter {
 	if m != nil {
-		return m.Filters
+		return m.FloatRangeFilters
 	}
 	return nil
 }
@@ -484,7 +497,7 @@ func (m *Match) GetProperties() *_struct.Struct {
 func init() {
 	proto.RegisterType((*Ticket)(nil), "api.Ticket")
 	proto.RegisterType((*Assignment)(nil), "api.Assignment")
-	proto.RegisterType((*Filter)(nil), "api.Filter")
+	proto.RegisterType((*FloatRangeFilter)(nil), "api.FloatRangeFilter")
 	proto.RegisterType((*Pool)(nil), "api.Pool")
 	proto.RegisterType((*Roster)(nil), "api.Roster")
 	proto.RegisterType((*MatchProfile)(nil), "api.MatchProfile")
@@ -494,35 +507,37 @@ func init() {
 func init() { proto.RegisterFile("api/messages.proto", fileDescriptor_cb9fb1f207fd5b8c) }
 
 var fileDescriptor_cb9fb1f207fd5b8c = []byte{
-	// 476 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x6e, 0xd4, 0x30,
-	0x10, 0x86, 0x95, 0xcd, 0x6e, 0x4a, 0x66, 0x4b, 0x41, 0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57, 0x35, 0x79, 0x05, 0x8f, 0x83, 0xa5, 0x43, 0x2b, 0x08, 0x9a, 0xd2, 0xc3, 0x6e, 0xda,
-	0xde, 0x19, 0x1c, 0x85, 0xa2, 0x6d, 0x2f, 0xc3, 0x13, 0x8a, 0xb1, 0x2a, 0x1c, 0xbd, 0x1c, 0x44,
-	0xcf, 0x15, 0x66, 0xf4, 0x27, 0x57, 0xf8, 0x19, 0xe8, 0xe8, 0x4d, 0xf1, 0x17, 0xff, 0xc6, 0xff,
-	0x6b, 0x7e, 0xc9, 0x7f, 0xcf, 0xef, 0x7d, 0xfe, 0x79, 0xa5, 0x34, 0x97, 0xaf, 0x11, 0xae, 0xa8,
-	0xf9, 0xd7, 0x72, 0xb7, 0x2d, 0xf5, 0x5d, 0x53, 0xea, 0xcd, 0x26, 0xc1, 0x80, 0x37, 0xbf, 0x03,
-	0x00, 0x00, 0xff, 0xff, 0xfe, 0x4c, 0x88, 0xfb, 0xfd, 0x03, 0x00, 0x00,
+	// 500 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x6e, 0xd4, 0x3e,
+	0x10, 0xc6, 0x95, 0xcd, 0xee, 0xf6, 0x9f, 0xd9, 0xfe, 0x4b, 0x31, 0x42, 0x0d, 0x55, 0x81, 0x55,
+	0x50, 0xa5, 0xbd, 0x90, 0x48, 0xe5, 0xc0, 0x81, 0x13, 0x48, 0xac, 0xd4, 0x03, 0x52, 0xe5, 0xf6,
+	0xc4, 0x65, 0xe5, 0x4d, 0x9c, 0x60, 0x35, 0xb1, 0x2d, 0xdb, 0x41, 0x9c, 0x79, 0x01, 0x1e, 0x82,
+	0x67, 0xe4, 0x8e, 0x32, 0x4e, 0xba, 0x61, 0x55, 0x24, 0xd4, 0x9b, 0xfd, 0xcd, 0xf8, 0x9b, 0xdf,
+	0x7c, 0x9b, 0x05, 0xc2, 0xb4, 0xc8,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0x74, 0xa8, 0x8d, 0xf1, 0x67, 0x7f, 0xc7, 0xdf, 0xcb, 0x6f, 0xfe, 0xcf, 0xf9, 0x7d, 0x48, 0x3e,
+	0x2f, 0x95, 0xe6, 0xf2, 0x35, 0xc2, 0xa5, 0x05, 0xff, 0x9a, 0xed, 0xae, 0x99, 0xbe, 0xad, 0x32,
+	0xbd, 0xdd, 0xce, 0xd1, 0xe0, 0xcd, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x59, 0x84, 0x1e,
+	0x27, 0x04, 0x00, 0x00,
 }


Test patch:
diff --git a/internal/app/backend/backend_service_test.go b/internal/app/backend/backend_service_test.go
index cc4019c8..7ee9ff65 100644
--- a/internal/app/backend/backend_service_test.go
+++ b/internal/app/backend/backend_service_test.go
@@ -233,7 +233,7 @@ func TestDoAssignTickets(t *testing.T) {
 				// Make sure tickets are correctly indexed.
 				var wantFilteredTickets []*pb.Ticket
 				pool := &pb.Pool{
-					Filters: []*pb.Filter{{Attribute: fakeProperty, Min: 0, Max: 3}},
+					FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: fakeProperty, Min: 0, Max: 3}},
 				}
 				err := store.FilterTickets(ctx, pool, 10, func(filterTickets []*pb.Ticket) error {
 					wantFilteredTickets = filterTickets
@@ -279,7 +279,7 @@ func TestDoAssignTickets(t *testing.T) {
 				// Make sure tickets are deindexed after assignment
 				var wantFilteredTickets []*pb.Ticket
 				pool := &pb.Pool{
-					Filters: []*pb.Filter{{Attribute: fakeProperty, Min: 0, Max: 2}},
+					FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: fakeProperty, Min: 0, Max: 2}},
 				}
 				store.FilterTickets(ctx, pool, 10, func(filterTickets []*pb.Ticket) error {
 					wantFilteredTickets = filterTickets
diff --git a/internal/app/mmlogic/mmlogic_service_test.go b/internal/app/mmlogic/mmlogic_service_test.go
index 0e88f7e2..f0c34317 100644
--- a/internal/app/mmlogic/mmlogic_service_test.go
+++ b/internal/app/mmlogic/mmlogic_service_test.go
@@ -68,7 +68,7 @@ func TestDoQueryTickets(t *testing.T) {
 			"expect empty response from an empty store",
 			senderGenerator(nil),
 			&pb.Pool{
-				Filters: []*pb.Filter{
+				FloatRangeFilters: []*pb.FloatRangeFilter{
 					{
 						Attribute: attribute1,
 						Min:       0,
@@ -85,7 +85,7 @@ func TestDoQueryTickets(t *testing.T) {
 			"expect tickets with attribute1 value in range of [0, 10] (inclusively)",
 			senderGenerator(nil),
 			&pb.Pool{
-				Filters: []*pb.Filter{
+				FloatRangeFilters: []*pb.FloatRangeFilter{
 					{
 						Attribute: attribute1,
 						Min:       0,
@@ -110,7 +110,7 @@ func TestDoQueryTickets(t *testing.T) {
 			"expect error from canceled context",
 			senderGenerator(fakeErr),
 			&pb.Pool{
-				Filters: []*pb.Filter{
+				FloatRangeFilters: []*pb.FloatRangeFilter{
 					{
 						Attribute: attribute1,
 						Min:       0,
diff --git a/internal/filter/filter_test.go b/internal/filter/filter_test.go
index fd4d6e8a..d16f678e 100644
--- a/internal/filter/filter_test.go
+++ b/internal/filter/filter_test.go
@@ -61,7 +61,7 @@ func TestFilter(t *testing.T) {
 		},
 	}
 
-	filters := []*pb.Filter{
+	filters := []*pb.FloatRangeFilter{
 		{
 			Attribute: "field1",
 			Min:       0,
@@ -90,7 +90,7 @@ func TestInFilters(t *testing.T) {
 		Id: "good",
 	}
 
-	filters := []*pb.Filter{}
+	filters := []*pb.FloatRangeFilter{}
 
 	passed := InFilters(ticket, filters)
 
diff --git a/internal/filter/testcases/testcases.go b/internal/filter/testcases/testcases.go
index 8a791b17..b2152f97 100644
--- a/internal/filter/testcases/testcases.go
+++ b/internal/filter/testcases/testcases.go
@@ -27,7 +27,7 @@ import (
 type TestCase struct {
 	Name   string
 	Ticket *pb.Ticket
-	Filter *pb.Filter
+	Filter *pb.FloatRangeFilter
 }
 
 // IncludedTestCases returns a list of test cases where using the given filter,
@@ -53,7 +53,7 @@ func ExcludedTestCases() []TestCase {
 					Fields: map[string]*structpb.Value{},
 				},
 			},
-			&pb.Filter{
+			&pb.FloatRangeFilter{
 				Attribute: "field",
 				Min:       5,
 				Max:       5,
@@ -68,7 +68,7 @@ func ExcludedTestCases() []TestCase {
 					Fields: nil,
 				},
 			},
-			&pb.Filter{
+			&pb.FloatRangeFilter{
 				Attribute: "field",
 				Min:       5,
 				Max:       5,
@@ -81,7 +81,7 @@ func ExcludedTestCases() []TestCase {
 				// Using struct literals without helper for degenerate cases only.
 				Properties: nil,
 			},
-			&pb.Filter{
+			&pb.FloatRangeFilter{
 				Attribute: "field",
 				Min:       5,
 				Max:       5,
@@ -104,7 +104,7 @@ func simpleRangeTest(name string, value, min, max float64) TestCase {
 				"field": structs.Number(value),
 			}.S(),
 		},
-		&pb.Filter{
+		&pb.FloatRangeFilter{
 			Attribute: "field",
 			Min:       min,
 			Max:       max,
diff --git a/internal/statestore/redis_indices.go b/internal/statestore/redis_indices.go
index 10d82aa7..1ed9f592 100644
--- a/internal/statestore/redis_indices.go
+++ b/internal/statestore/redis_indices.go
@@ -64,7 +64,7 @@ type indexFilter struct {
 func extractIndexFilters(p *pb.Pool) []indexFilter {
 	filters := make([]indexFilter, 0)
 
-	for _, f := range p.Filters {
+	for _, f := range p.FloatRangeFilters {
 		filters = append(filters, indexFilter{
 			name: rangeIndexName(f.Attribute),
 			min:  f.Min,
diff --git a/internal/statestore/redis_indices_test.go b/internal/statestore/redis_indices_test.go
index 2c650487..810984ce 100644
--- a/internal/statestore/redis_indices_test.go
+++ b/internal/statestore/redis_indices_test.go
@@ -95,8 +95,8 @@ func TestExtractIndexFilters(t *testing.T) {
 		{
 			description: "range",
 			pool: &pb.Pool{
-				Filters: []*pb.Filter{
-					&pb.Filter{
+				FloatRangeFilters: []*pb.FloatRangeFilter{
+					&pb.FloatRangeFilter{
 						Attribute: "foo",
 						Min:       -1,
 						Max:       1,
diff --git a/internal/statestore/redis_test.go b/internal/statestore/redis_test.go
index 86752d14..92073bcd 100644
--- a/internal/statestore/redis_test.go
+++ b/internal/statestore/redis_test.go
@@ -125,7 +125,7 @@ func TestIgnoreLists(t *testing.T) {
 	verifyTickets := func(service Service, expectLen int) {
 		var results []*pb.Ticket
 		pool := &pb.Pool{
-			Filters: []*pb.Filter{
+			FloatRangeFilters: []*pb.FloatRangeFilter{
 				{Attribute: "testindex1", Min: 0, Max: 10},
 				{Attribute: "testindex2", Min: 0, Max: 10},
 			},
@@ -191,7 +191,7 @@ func TestTicketIndexing(t *testing.T) {
 	found := []string{}
 
 	pool := &pb.Pool{
-		Filters: []*pb.Filter{
+		FloatRangeFilters: []*pb.FloatRangeFilter{
 			{
 				Attribute: "testindex1",
 				Min:       2.5,
diff --git a/test/e2e/fetch_matches_test.go b/test/e2e/fetch_matches_test.go
index dbdfdb42..e7a97089 100644
--- a/test/e2e/fetch_matches_test.go
+++ b/test/e2e/fetch_matches_test.go
@@ -113,20 +113,20 @@ func TestGameMatchWorkFlow(t *testing.T) {
 				Name: "test-profile",
 				Pools: []*pb.Pool{
 					{
-						Name:    "ticket12",
-						Filters: []*pb.Filter{{Attribute: "level", Min: 0, Max: 6}, {Attribute: "defense", Min: 0, Max: 100}},
+						Name:              "ticket12",
+						FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: "level", Min: 0, Max: 6}, {Attribute: "defense", Min: 0, Max: 100}},
 					},
 					{
-						Name:    "ticket23",
-						Filters: []*pb.Filter{{Attribute: "level", Min: 3, Max: 10}, {Attribute: "defense", Min: 0, Max: 100}},
+						Name:              "ticket23",
+						FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: "level", Min: 3, Max: 10}, {Attribute: "defense", Min: 0, Max: 100}},
 					},
 					{
-						Name:    "ticket5",
-						Filters: []*pb.Filter{{Attribute: "level", Min: 0, Max: 100}, {Attribute: "defense", Min: 17, Max: 25}},
+						Name:              "ticket5",
+						FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: "level", Min: 0, Max: 100}, {Attribute: "defense", Min: 17, Max: 25}},
 					},
 					{
-						Name:    "ticket234",
-						Filters: []*pb.Filter{{Attribute: "level", Min: 3, Max: 17}, {Attribute: "defense", Min: 3, Max: 17}},
+						Name:              "ticket234",
+						FloatRangeFilters: []*pb.FloatRangeFilter{{Attribute: "level", Min: 3, Max: 17}, {Attribute: "defense", Min: 3, Max: 17}},
 					},
 				},
 			},
diff --git a/test/e2e/minimatch_test.go b/test/e2e/minimatch_test.go
index 69a6a7ad..9db3c299 100644
--- a/test/e2e/minimatch_test.go
+++ b/test/e2e/minimatch_test.go
@@ -62,28 +62,28 @@ func TestMinimatch(t *testing.T) {
 	testPools := map[string]*pb.Pool{
 		e2e.Map1BeginnerPool: {
 			Name: e2e.Map1BeginnerPool,
-			Filters: []*pb.Filter{
+			FloatRangeFilters: []*pb.FloatRangeFilter{
 				{Attribute: e2e.SkillAttribute, Min: 0, Max: 5},
 				{Attribute: e2e.Map1Attribute, Max: math.MaxFloat64},
 			},
 		},
 		e2e.Map1AdvancedPool: {
 			Name: e2e.Map1AdvancedPool,
-			Filters: []*pb.Filter{
+			FloatRangeFilters: []*pb.FloatRangeFilter{
 				{Attribute: e2e.SkillAttribute, Min: 6, Max: 10},
 				{Attribute: e2e.Map1Attribute, Max: math.MaxFloat64},
 			},
 		},
 		e2e.Map2BeginnerPool: {
 			Name: e2e.Map2BeginnerPool,
-			Filters: []*pb.Filter{
+			FloatRangeFilters: []*pb.FloatRangeFilter{
 				{Attribute: e2e.SkillAttribute, Min: 0, Max: 5},
 				{Attribute: e2e.Map2Attribute, Max: math.MaxFloat64},
 			},
 		},
 		e2e.Map2AdvancedPool: {
 			Name: e2e.Map2AdvancedPool,
-			Filters: []*pb.Filter{
+			FloatRangeFilters: []*pb.FloatRangeFilter{
 				{Attribute: e2e.SkillAttribute, Min: 6, Max: 10},
 				{Attribute: e2e.Map2Attribute, Max: math.MaxFloat64},
 			},
diff --git a/test/e2e/query_tickets_test.go b/test/e2e/query_tickets_test.go
index 210f5ef3..3986f5a3 100644
--- a/test/e2e/query_tickets_test.go
+++ b/test/e2e/query_tickets_test.go
@@ -51,7 +51,7 @@ func TestQueryTickets(t *testing.T) {
 			description: "expects response with no tickets since the store is empty",
 			preAction:   func(_ context.Context, _ pb.FrontendClient, _ *testing.T) {},
 			pool: &pb.Pool{
-				Filters: []*pb.Filter{{
+				FloatRangeFilters: []*pb.FloatRangeFilter{{
 					Attribute: "ok",
 				}},
 			},
@@ -74,7 +74,7 @@ func TestQueryTickets(t *testing.T) {
 				}
 			},
 			pool: &pb.Pool{
-				Filters: []*pb.Filter{{
+				FloatRangeFilters: []*pb.FloatRangeFilter{{
 					Attribute: e2e.SkillAttribute,
 				}},
 			},
@@ -97,7 +97,7 @@ func TestQueryTickets(t *testing.T) {
 				}
 			},
 			pool: &pb.Pool{
-				Filters: []*pb.Filter{{
+				FloatRangeFilters: []*pb.FloatRangeFilter{{
 					Attribute: e2e.Map1Attribute,
 					Min:       1,
 					Max:       3,
@@ -127,7 +127,7 @@ func TestQueryTickets(t *testing.T) {
 			},
 
 			pool: &pb.Pool{
-				Filters: []*pb.Filter{{
+				FloatRangeFilters: []*pb.FloatRangeFilter{{
 					Attribute: e2e.Map1Attribute,
 					Min:       2,
 					Max:       6,