lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r582250 - in /lucene/solr/trunk/client/ruby/solr-ruby: lib/solr/response/ruby.rb test/conf/schema.xml test/functional/server_test.rb
Date Fri, 05 Oct 2007 13:21:14 GMT
Author: ehatcher
Date: Fri Oct  5 06:21:13 2007
New Revision: 582250

URL: http://svn.apache.org/viewvc?rev=582250&view=rev
Log:
Add future example of what a solr-ruby Solr writer type could do with dates

Modified:
    lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/response/ruby.rb
    lucene/solr/trunk/client/ruby/solr-ruby/test/conf/schema.xml
    lucene/solr/trunk/client/ruby/solr-ruby/test/functional/server_test.rb

Modified: lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/response/ruby.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/response/ruby.rb?rev=582250&r1=582249&r2=582250&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/response/ruby.rb (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/lib/solr/response/ruby.rb Fri Oct  5 06:21:13
2007
@@ -38,5 +38,5 @@
   def query_time
     @header['QTime']
   end
-
+  
 end

Modified: lucene/solr/trunk/client/ruby/solr-ruby/test/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/test/conf/schema.xml?rev=582250&r1=582249&r2=582250&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/test/conf/schema.xml (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/test/conf/schema.xml Fri Oct  5 06:21:13 2007
@@ -212,6 +212,7 @@
         both match, the first appearing in the schema will be used.  -->
    <dynamicField name="*_facet"  type="string"  indexed="true"  stored="true"/>
    <dynamicField name="*_text"   type="text"    indexed="true"  stored="true"/>
+   <dynamicField name="*_date"   type="date"    indexed="true"  stored="true"/>
  </fields>
 
  <!-- field to use to determine and enforce document uniqueness. -->

Modified: lucene/solr/trunk/client/ruby/solr-ruby/test/functional/server_test.rb
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/test/functional/server_test.rb?rev=582250&r1=582249&r2=582250&view=diff
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/test/functional/server_test.rb (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/test/functional/server_test.rb Fri Oct  5 06:21:13
2007
@@ -35,12 +35,15 @@
     @connection.delete(123456)
 
     # add it
-    @connection.add(:id => 123456, :text => 'Borges')
+    @connection.add(:id => 123456, :text => 'Borges') # add :some_date => 'NOW/HOUR'
to test richer data type handling
+    # now = DateTime.now
 
     # look for it
     response = @connection.query('Borges')
     assert_equal 1, response.total_hits
-    assert_equal '123456', response.hits[0]['id']
+    hit = response.hits[0]
+    assert_equal '123456', hit['id']
+    # assert_equal now.year, hit['whatever_date'].year
     
     # look for it via dismax
     response = @connection.search('Borges')



Mime
View raw message