O'Reilly logo

Learning Chef by Rishabh Sharma, Mitesh Soni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing search

Search is the procedure that allows users to get any type of information and data that is indexed by the Chef server.

Search is basically a text query that is performed by many locations, for example, /search/INDEX in the Chef server, within a recipe. These locations can be used to run the search command with Knife with the help of the search functionality provided in the Management Console or by creating indexes in the API (the Chef server), such as:

  • /search/Index
  • /search
  • The search command with knife

A Chef search includes searching for nodes, roles, data bags, and environments.

The knife search subcommand triggers a search query to get the stored information indexed on a server.

Syntax of a search query

A search query command is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required