-
Notifications
You must be signed in to change notification settings - Fork 129
Chef Search Query Using Brackets Fails #69
Comments
That search doesn't do what you think anyway, |
@coderanger Seems that it does operate on numbers: https://brettscott.wordpress.com/2011/11/19/lucene-number-range-search-integers-floats/ |
@coderanger When doing the search via knife search node, I do get the correct data back that I expect. Example |
Also figured out my own issue. It was not due to escaping. I had lower-case
Perfect! |
Just as long as you are aware that won't always do what you want :-) I would highly recommend implementing the filter in Python code if it is something important. |
@coderanger Mainly, I'm looking to not get all nodes (and node info) back from the Chef server each time I run a search. I could just run Search('node') and then parse through that via python but I'd rather use the server's back-end to do the searching for me. My code here is just the first step in a node sweeping process. Step two would take each item in that list and check if the machine is still running, so there is that safety ;) |
👍 |
Looks like searching with
[ ]
for ranges fails. Assuming it's an escaping issue. Works if I manually escape.PyChef 0.3.0
Python 2.7.13 on CentOS
Working:
Not working:
The text was updated successfully, but these errors were encountered: