I got indexed some data of a MySQL db in my Solr engine. It works fine when I search keywords along with the field names : "q=texted_value:car" returns my db record
<doc><str name="id">6</str><str name="texted_value">car</str></doc>
However, I need to be able to perform full-text search in my db, without giving the fieldname (q=car). So how do we do that ? If it's including Transformer or Processor in my data-config will you please guide me ?
my data-config.xml :
<entity name="test0"
pk="id"
query="select * from test0">
<field column="value_t" name="texted_value" />
</entity>
Thx
Common technique used to search across fields in Solr is to use
copyField
directive. This copies values from the original field to destination field. Normally it is indexed without norms & not stored.Make
textAll
field as default field in yourschema.xml
,Now you can search http://server/solr/select/?q=car this will search across all your fields. This will increase the performance of your searching, instead of searching each fields individually you search for one field
textAll
. It comes with a price of increase in indexing time & file size.Read Solr copyFields