Skip to content

Commit

Permalink
DXCDT-592: Adding lucene examples to auth0 users search (#912)
Browse files Browse the repository at this point in the history
* Adding search query examples to users search command

* Adding parentheses

* Adding wildcard

* Changing text

---------

Co-authored-by: Will Vedder <will.vedder@okta.com>
  • Loading branch information
willvedd and willvedd authored Nov 14, 2023
1 parent f5b138a commit 0910c2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions docs/auth0_users_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ auth0 users search [flags]
## Flags

```
--json Output in json format.
-n, --number int Number of users, that match the search criteria, to retrieve. Minimum 1, maximum 1000. If limit is hit, refine the search query. (default 50)
-q, --query string Query in Lucene query syntax. See https://auth0.com/docs/users/user-search/user-search-query-syntax for more details.
-s, --sort string Field to sort by. Use 'field:order' where 'order' is '1' for ascending and '-1' for descending. e.g. 'created_at:1'.
--json Output in json format.
-n, --number int Number of users, that match the search criteria, to retrieve. Minimum 1, maximum 1000. If limit is hit, refine the search query. (default 50)
-q, --query email:"user123@*.com" OR (user_id:"user-id-123" AND name:"Bob") Search query in Lucene query syntax.
For example: email:"user123@*.com" OR (user_id:"user-id-123" AND name:"Bob")
For more info: https://auth0.com/docs/users/user-search/user-search-query-syntax.
-s, --sort string Field to sort by. Use 'field:order' where 'order' is '1' for ascending and '-1' for descending. e.g. 'created_at:1'.
```


Expand Down
2 changes: 1 addition & 1 deletion internal/cli/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var (
Name: "Query",
LongForm: "query",
ShortForm: "q",
Help: "Query in Lucene query syntax. See https://auth0.com/docs/users/user-search/user-search-query-syntax for more details.",
Help: "Search query in Lucene query syntax.\n\nFor example: `email:\"user123@*.com\" OR (user_id:\"user-id-123\" AND name:\"Bob\")`\n\n For more info: https://auth0.com/docs/users/user-search/user-search-query-syntax.",
IsRequired: true,
}
userSort = Flag{
Expand Down

0 comments on commit 0910c2a

Please sign in to comment.