mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 10:51:29 +00:00
Allow a Hash to be an available mapper parameter, instead of the client having to create a Mapper instance itself
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@532567 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4866d6e22f
commit
d1f038a1c8
@ -11,7 +11,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
class Solr::Indexer
|
||||
def self.index(data_source, mapper, options={})
|
||||
def self.index(data_source, mapper_or_mapping, options={})
|
||||
mapper = mapper_or_mapping.is_a?(Hash) ? Solr::Importer::Mapper.new(mapper_or_mapping) : mapper_or_mapping
|
||||
solr_url = options[:solr_url] || ENV["SOLR_URL"] || "http://localhost:8983/solr"
|
||||
|
||||
solr = Solr::Connection.new(solr_url, options) #TODO - these options contain the solr_url and debug keys also, so tidy up what gets passed
|
||||
|
Loading…
x
Reference in New Issue
Block a user