lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r508292 - /lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb
Date Fri, 16 Feb 2007 03:02:04 GMT
Author: ehatcher
Date: Thu Feb 15 19:02:03 2007
New Revision: 508292

URL: http://svn.apache.org/viewvc?view=rev&rev=508292
Log:
Add full title text, asin and published year, as well as moved publisher to facet

Modified:
    lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb

Modified: lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb?view=diff&rev=508292&r1=508291&r2=508292
==============================================================================
--- lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb (original)
+++ lucene/solr/trunk/client/ruby/solrb/examples/delicious_library/dl_importer.rb Thu Feb
15 19:02:03 2007
@@ -40,11 +40,14 @@
   :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 @@
   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 @@
 end
 
 solr.commit unless debug
+solr.optimize unless debug
\ No newline at end of file



Mime
View raw message