- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Solr/Lucene question
- Date: Thu, 11 Jul 2013 08:23:00 -0700
On Wednesday, July 10, 2013 at 2:04 PM, Morgan Blackthorne wrote:
I've been looking at COOK-3262, and something I've been wondering... What is the difference between:
hostname:[* TO *] NOT chef_environment:_default
And:
hostname:* NOT chef_environment:_default
?
I'm not really hip to Solr syntax outside of the most obvious stuff.
Nowadays, there's not any difference.
Long answer: In the original implementation of Solr search for chef, every key was stored as a separate field in Solr. Among other downsides, you cannot begin the search within a field with a wildcard character. We later rewrote the search implementation (for performance reasons) to store all data in one big field in Solr and added a translation layer on top of it. One of the benefits is that both the key and search query you send to the Chef server are actually just strings in the big Solr field, so a search like "hostname:*" is valid.
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.