Skip to content

Commit

Permalink
syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
spheromak committed Oct 7, 2014
1 parent 1439a5c commit f39259d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/search/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func main() {
}

// List Indexes
indexes, err := client.Nodes.List()
indexes, err := client.Search.Indexes()
if err != nil {
log.Fatal("Couldn't list nodes: ", err)
}
Expand Down
18 changes: 18 additions & 0 deletions search.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ type SearchService struct {
client *Client
}

// SearchQury Is the struct for holding a query request
type SearchQuery struct {
// The index you want to search
Index string

// The query you want to execute. This is the 'chef' query ex: 'chef_environment:prod'
Query string

// Sort order you want the search results returned
SortBy string

// Starting position for search
Start int

// Number of rows to return
rows int
}

// List lists the nodes in the Chef server.
//
// Chef API docs: http://docs.opscode.com/api_chef_server.html#id25
Expand Down

0 comments on commit f39259d

Please sign in to comment.