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: README.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -94,13 +94,15 @@ Here is how we might build the Schema for our examples, with a Datastore Entity
94
94
$obj_schema = (new GDS\Schema('Book'))
95
95
->addString('title')
96
96
->addString('author')
97
-
->addString('isbn', TRUE);
97
+
->addString('isbn');
98
98
99
99
// The Store accepts a Schema object or Kind name as it's second parameter
100
100
$obj_book_store = new GDS\Store($obj_gateway, $obj_schema);
101
101
```
102
102
103
-
In this example, the ISBN field has been specifically set as an indexed string field. By default, fields are string fields and are NOT indexed. An indexed field can be used in a WHERE clause.
103
+
By default, fields are indexed. An indexed field can be used in a WHERE clause. You can explicitly configure a field to be not indexed by passing in `FALSE` as the second parameter to `addString()`.
104
+
105
+
If you use a dynamic schema (i.e. do not define on, but just use the Entity name) then all fields will be indexed for that record.
0 commit comments