Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1ae4151

Browse files
author
twalder-docnet
committedMar 2, 2015
Update to reflect default indexing of properties
1 parent 999d1e4 commit 1ae4151

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ Here is how we might build the Schema for our examples, with a Datastore Entity
9494
$obj_schema = (new GDS\Schema('Book'))
9595
->addString('title')
9696
->addString('author')
97-
->addString('isbn', TRUE);
97+
->addString('isbn');
9898

9999
// The Store accepts a Schema object or Kind name as it's second parameter
100100
$obj_book_store = new GDS\Store($obj_gateway, $obj_schema);
101101
```
102102

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.
104106

105107
Avaialable Schema configuration methods:
106108
- `GDS\Schema::addString`

0 commit comments

Comments
 (0)
Please sign in to comment.