mirror of https://github.com/apache/lucene.git
SOLR-627: Add shards support to Standard request
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@676396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ad6fc5bb0
commit
15f8c56803
|
@ -6,6 +6,7 @@ v0.0.6:
|
||||||
- Fixed modify_document_test.rb so as to not be brittle with Hash ordering
|
- Fixed modify_document_test.rb so as to not be brittle with Hash ordering
|
||||||
- Added support for alternate field highlighting to Solr::Request::Standard (and thus DisMax)
|
- Added support for alternate field highlighting to Solr::Request::Standard (and thus DisMax)
|
||||||
- Added facet.offset support to Solr::Request::Standard/Dismax
|
- Added facet.offset support to Solr::Request::Standard/Dismax
|
||||||
|
- Added shards parameter to Solr::Request::Standard
|
||||||
|
|
||||||
v0.0.5:
|
v0.0.5:
|
||||||
release_date: 2007-08-27
|
release_date: 2007-08-27
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
class Solr::Request::Standard < Solr::Request::Select
|
class Solr::Request::Standard < Solr::Request::Select
|
||||||
|
|
||||||
VALID_PARAMS = [:query, :sort, :default_field, :operator, :start, :rows,
|
VALID_PARAMS = [:query, :sort, :default_field, :operator, :start, :rows, :shards,
|
||||||
:filter_queries, :field_list, :debug_query, :explain_other, :facets, :highlighting, :mlt]
|
:filter_queries, :field_list, :debug_query, :explain_other, :facets, :highlighting, :mlt]
|
||||||
|
|
||||||
def initialize(params)
|
def initialize(params)
|
||||||
|
@ -38,6 +38,8 @@ class Solr::Request::Standard < Solr::Request::Select
|
||||||
@params[:rows] = params[:rows].to_i if params[:rows]
|
@params[:rows] = params[:rows].to_i if params[:rows]
|
||||||
|
|
||||||
@params[:field_list] ||= ["*","score"]
|
@params[:field_list] ||= ["*","score"]
|
||||||
|
|
||||||
|
@params[:shards] ||= []
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_hash
|
def to_hash
|
||||||
|
@ -59,6 +61,7 @@ class Solr::Request::Standard < Solr::Request::Select
|
||||||
hash[:fl] = @params[:field_list].join(',')
|
hash[:fl] = @params[:field_list].join(',')
|
||||||
hash[:debugQuery] = @params[:debug_query]
|
hash[:debugQuery] = @params[:debug_query]
|
||||||
hash[:explainOther] = @params[:explain_other]
|
hash[:explainOther] = @params[:explain_other]
|
||||||
|
hash[:shards] = @params[:shards].join(',') unless @params[:shards].empty?
|
||||||
|
|
||||||
# facet parameter processing
|
# facet parameter processing
|
||||||
if @params[:facets]
|
if @params[:facets]
|
||||||
|
|
Loading…
Reference in New Issue