Class | Chef::SolrQuery
In: | lib/chef/solr_query.rb lib/chef/solr_query/query_transform.rb lib/chef/solr_query/solr_http_request.rb
Parent: | Object

### Methods

commit delete_database filter_by filter_by_type filter_query from_params new object_ids objects rebuild_index reindex_all results search to_hash update_filter_query_from_params update_query_from_params

### Included Modules

Chef::Mixin::XMLEscape

### Classes and Modules

Class Chef::SolrQuery::QueryTransform
Class Chef::SolrQuery::SolrHTTPRequest

### Constants

ID_KEY | = | "X_CHEF_id_CHEF_X"
DEFAULT_PARAMS | = | Mash.new(:start => 0, :rows => 1000, :sort => "#{ID_KEY} asc", :wt => 'json', :indent => 'off').freeze
FILTER_PARAM_MAP | = | {:database => 'X_CHEF_database_CHEF_X', :type => "X_CHEF_type_CHEF_X", :data_bag => 'data_bag'}
VALID_PARAMS | = | [:start,:rows,:sort,:q,:type]
BUILTIN_SEARCH_TYPES | = | ["role","node","client","environment"]
DATA_BAG_ITEM | = | 'data_bag_item'
START_XML | = | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".freeze
START_DELETE_BY_QUERY | = | "<delete><query>".freeze
END_DELETE_BY_QUERY | = | "</query></delete>\n".freeze
COMMIT | = | "<commit/>\n".freeze

### Attributes

params | [RW] |
query | [RW] |

### Public Class methods

from_params(params, couchdb=nil)
new(couchdb = nil)

Create a new Query object - takes the solr_url and optional Chef::CouchDB object to inflate objects into.

### Public Instance methods

commit(opts={})
delete_database(db)
filter_by(filter_query_params)
filter_by_type(type)
filter_query()
object_ids()
objects()
rebuild_index(db=Chef::Config[:couchdb_database])
reindex_all(klass, metadata={})
results()
search()

Search Solr for objects of a given type, for a given query.

to_hash()
update_filter_query_from_params()
update_query_from_params()

[Validate]