Update README.md

This commit is contained in:
Josh Baker 2021-06-17 07:42:00 -07:00 committed by GitHub
parent e49c1a2edd
commit 89544ad8fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -455,8 +455,9 @@ Any index can be put in descending order by wrapping it's less function with `bu
```go
db.CreateIndex("last_name_age", "*",
buntdb.IndexJSON("name.last"),
buntdb.Desc(buntdb.IndexJSON("age")))
buntdb.IndexJSON("name.last"),
buntdb.Desc(buntdb.IndexJSON("age")),
)
```
This will create a multi value index where the last name is ascending and the age is descending.