Apache Solr open-source search software
Simplify schema, with only 4 fields: id, text, *_facet, and *_text. The client does not send text, only *_text, which gets copied into the text field. This is surely overly simplified, and will evolve back as field name munging facilities are added and other data types are supported.
Erik Hatchere343ccc2ab88
diff --git a/client/ruby/solrb/solr/solr/conf/schema.xml b/client/ruby/solrb/solr/solr/conf/schema.xmlindex 3d05e0e330c..9ebe4d3f12f 100755--- a/client/ruby/solrb/solr/solr/conf/schema.xml+++ b/client/ruby/solrb/solr/solr/conf/schema.xml@@ -210,14 +210,8 @@EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)Longer patterns will be matched first. if equal size patternsboth match, the first appearing in the schema will be used. -->- <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>- <dynamicField name="*_s" type="string" indexed="true" stored="true"/>- <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>- <dynamicField name="*_t" type="text" indexed="true" stored="true"/>- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>- <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>- <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>+ <dynamicField name="*_facet" type="string" indexed="true" stored="true"/>+ <dynamicField name="*_text" type="text" indexed="true" stored="true"/></fields><!-- field to use to determine and enforce document uniqueness. -->@@ -232,16 +226,7 @@<!-- copyField commands copy one field to another at the time a documentis added to the index. It's used either to index the same field differently,or to add multiple fields to the same field for easier/faster searching. -->-<!-- <copyField source="id" dest="sku"/>-- <copyField source="cat" dest="text"/>- <copyField source="name" dest="text"/>- <copyField source="manu" dest="text"/>- <copyField source="features" dest="text"/>- <copyField source="includes" dest="text"/>-- <copyField source="manu" dest="manu_exact"/>--->+ <copyField source="*_text" dest="text"/><!-- Similarity is the scoring routine for each document vs. a query.A custom similarity may be specified here, but the default is finediff --git a/client/ruby/solrb/solr/solr/conf/solrconfig.xml b/client/ruby/solrb/solr/solr/conf/solrconfig.xmlindex a7c5fd53cbb..451f23a8bb1 100755--- a/client/ruby/solrb/solr/solr/conf/solrconfig.xml+++ b/client/ruby/solrb/solr/solr/conf/solrconfig.xml@@ -267,7 +267,7 @@& separated key=val pairs ... but there shouldn't be anyURL escaping of the values --><pingQuery>- qt=dismax&q=solr&start=3&fq=id:[* TO *]&fq=cat:[* TO *]+ q=solr</pingQuery><!-- configure a healthcheck file for servers behind a loadbalancer<healthcheck type="file">server-enabled</healthcheck>diff --git a/client/ruby/solrb/test/conf/schema.xml b/client/ruby/solrb/test/conf/schema.xmlindex 3d05e0e330c..9ebe4d3f12f 100755--- a/client/ruby/solrb/test/conf/schema.xml+++ b/client/ruby/solrb/test/conf/schema.xml@@ -210,14 +210,8 @@EXAMPLE: name="*_i" will match any field ending in _i (like myid_i, z_i)Longer patterns will be matched first. if equal size patternsboth match, the first appearing in the schema will be used. -->- <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>- <dynamicField name="*_s" type="string" indexed="true" stored="true"/>- <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>- <dynamicField name="*_t" type="text" indexed="true" stored="true"/>- <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>- <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>- <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>- <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>+ <dynamicField name="*_facet" type="string" indexed="true" stored="true"/>+ <dynamicField name="*_text" type="text" indexed="true" stored="true"/></fields><!-- field to use to determine and enforce document uniqueness. -->@@ -232,16 +226,7 @@<!-- copyField commands copy one field to another at the time a documentis added to the index. It's used either to index the same field differently,or to add multiple fields to the same field for easier/faster searching. -->-<!-- <copyField source="id" dest="sku"/>-- <copyField source="cat" dest="text"/>- <copyField source="name" dest="text"/>- <copyField source="manu" dest="text"/>- <copyField source="features" dest="text"/>- <copyField source="includes" dest="text"/>-- <copyField source="manu" dest="manu_exact"/>--->+ <copyField source="*_text" dest="text"/><!-- Similarity is the scoring routine for each document vs. a query.A custom similarity may be specified here, but the default is finediff --git a/client/ruby/solrb/test/functional/server_test.rb b/client/ruby/solrb/test/functional/server_test.rbindex 8e192b7fadb..1bfe4f2918c 100644--- a/client/ruby/solrb/test/functional/server_test.rb+++ b/client/ruby/solrb/test/functional/server_test.rb@@ -58,11 +58,11 @@ class ServerTest < Test::Unit::TestCaseenddef test_escaping- doc = Solr::Document.new :id => 47, :ruby_t => 'puts "ouch!"'+ doc = Solr::Document.new :id => 47, :ruby_text => 'puts "ouch!"'@connection.send(Solr::Request::AddDocument.new(doc))@connection.commit- request = Solr::Request::Standard.new :query => 'ruby_t:ouch'+ request = Solr::Request::Standard.new :query => 'ouch'result = @connection.send(request)assert_match /puts/, result.raw_response