From 7f130dd630e9d9ab865448b9b060a03e46a08614 Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Fri, 16 Feb 2007 03:02:03 +0000 Subject: [PATCH] Add full title text, asin and published year, as well as moved publisher to facet git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@508292 13f79535-47bb-0310-9956-ffa450edef68 --- .../solrb/examples/delicious_library/dl_importer.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/client/ruby/solrb/examples/delicious_library/dl_importer.rb b/client/ruby/solrb/examples/delicious_library/dl_importer.rb index 1978c480543..e7aeffb700a 100755 --- a/client/ruby/solrb/examples/delicious_library/dl_importer.rb +++ b/client/ruby/solrb/examples/delicious_library/dl_importer.rb @@ -40,11 +40,14 @@ mapping = { :language_facet => :language, :genre_facet => Proc.new {|data| data.genre.split('/').map {|s| s.strip}}, :title_text => :title, + :full_title_text => :fullTitle, + :asin_text => :asin, # TODO: schema needs a field for non-tokenized text which is not a facet :notes_text => :notes, - :publisher_text => :publisher, + :publisher_facet => :publisher, :description_text => :description, :author_text => :author, - :pages_text => :pages + :pages_text => :pages, + :published_year_facet => Proc.new {|data| data.published.scan(/\d\d\d\d/)[0]} } lines[1..-1].each do |line| @@ -52,6 +55,8 @@ lines[1..-1].each do |line| def data.method_missing(key) self.assoc(key.to_s)[1] end + + # puts data.inspect if debug doc = {} mapping.each do |solr_name, data_column_or_proc| @@ -70,3 +75,4 @@ lines[1..-1].each do |line| end solr.commit unless debug +solr.optimize unless debug \ No newline at end of file