Knife search edge cases

I’m routinely frustrated by knife search queries. Is there a more
detailed guide that what’s on docs.opscode.com or does anyone have any
general tips from past experience?

Hopefully without diminishing the general query above and then only
getting explicit replies to these questions… how do I escape a ':'
that I want to match against in my query? how do I escape a ’ '?

On Fri, Jun 6, 2014 at 6:44 PM, Jeff Blaine jblaine@kickflop.net wrote:

I'm routinely frustrated by knife search queries. Is there a more
detailed guide that what's on docs.opscode.com or does anyone have any
general tips from past experience?

Which docs are you looking at? I'd say
About Search is pretty detailed, and a
vast improvement on the search docs I recall from the old wiki. That said,
nothing's perfect and I'm sure the Chef folks would appreciate feedback on
what's missing.

Hopefully without diminishing the general query above and then only

getting explicit replies to these questions... how do I escape a ':'
that I want to match against in my query? how do I escape a ' '?

Any "special" character can be escaped with a backslash, and colon is
included in that set (see
About Search ). You
don't need to escape spaces.

Most of the things that I thought were under-documented in the past (eg,
nested field syntax, gotchas searching for run list items) seem to be
thoroughly covered in the current docs, so I'm coming up short on other
hints and tips. If you were expanding the docs, are there any particular
headlines or topics you'd like to see filled out?

Zac

This probably helps too:

Gets more information about the query patterns into the actual
knife_search.html page.

On Fri, Jun 6, 2014 at 11:02 AM, Zac Stevens zts@cryptocracy.com wrote:

On Fri, Jun 6, 2014 at 6:44 PM, Jeff Blaine jblaine@kickflop.net wrote:

I'm routinely frustrated by knife search queries. Is there a more
detailed guide that what's on docs.opscode.com or does anyone have any
general tips from past experience?

Which docs are you looking at? I'd say
About Search is pretty detailed, and a
vast improvement on the search docs I recall from the old wiki. That said,
nothing's perfect and I'm sure the Chef folks would appreciate feedback on
what's missing.

Hopefully without diminishing the general query above and then only

getting explicit replies to these questions... how do I escape a ':'
that I want to match against in my query? how do I escape a ' '?

Any "special" character can be escaped with a backslash, and colon is
included in that set (see
About Search ). You
don't need to escape spaces.

Most of the things that I thought were under-documented in the past (eg,
nested field syntax, gotchas searching for run list items) seem to be
thoroughly covered in the current docs, so I'm coming up short on other
hints and tips. If you were expanding the docs, are there any particular
headlines or topics you'd like to see filled out?

Zac

On 6/6/2014 4:10 PM, James Scott wrote:

This probably helps too:

add context to knife_search.html · chef-boneyard/chef-web-docs-2016@ae51ad2 · GitHub

Gets more information about the query patterns into the actual
knife_search.html page.

Yes. That! I wasn't hitting that with google. Thanks James and Zac.

Digging back through my bash history from earlier today, here's a
problem case:

% knife search 'lastrun_runtimes_end:2014-06-06 11:33*' -i | grep eleven
eleven
% knife node show eleven -a lastrun.runtimes.end
eleven:
lastrun.runtimes.end: 2014-06-06 16:01:05 -0400

o_O
Jeff

On Fri, Jun 6, 2014 at 11:02 AM, Zac Stevens <zts@cryptocracy.com
mailto:zts@cryptocracy.com> wrote:

On Fri, Jun 6, 2014 at 6:44 PM, Jeff Blaine <jblaine@kickflop.net
<mailto:jblaine@kickflop.net>> wrote:

    I'm routinely frustrated by knife search queries. Is there a more
    detailed guide that what's on docs.opscode.com
    <http://docs.opscode.com> or does anyone have any
    general tips from past experience?


Which docs are you looking at?  I'd say
http://docs.opscode.com/essentials_search.html is pretty detailed,
and a vast improvement on the search docs I recall from the old
wiki.  That said, nothing's perfect and I'm sure the Chef folks
would appreciate feedback on what's missing.

    Hopefully without diminishing the general query above and then only
    getting explicit replies to these questions... how do I escape a ':'
    that I want to match against in my query? how do I escape a ' '?


Any "special" character can be escaped with a backslash, and colon
is included in that set (see
http://docs.opscode.com/essentials_search.html#special-characters ).
 You don't need to escape spaces.

Most of the things that I thought were under-documented in the past
(eg, nested field syntax, gotchas searching for run list items) seem
to be thoroughly covered in the current docs, so I'm coming up short
on other hints and tips.  If you were expanding the docs, are there
any particular headlines or topics you'd like to see filled out?


Zac