solr - search key, in all fields mentioned in xml -


i new solarium , using version 2. have created schema, , need know on how pass search key should search in fields or few fields per xml.

ex : fields this. "title", "description", "keywords" etc. when user types word "xyz" should search in above mentioned fields , result me output. should search not has exact should our sql "like"

the solarium sample examples didn't come handy.

any appreciated.

edit _ fields used

<fieldtype name="text_general" class="solr.textfield" positionincrementgap="100">   <analyzer type="index">     <tokenizer class="solr.standardtokenizerfactory"/>     <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt" enablepositionincrements="true" />     <!-- in example, use synonyms @ query time     <filter class="solr.synonymfilterfactory" synonyms="index_synonyms.txt" ignorecase="true" expand="false"/>     -->     <filter class="solr.lowercasefilterfactory"/> 

all fields type text_general.. use solr 4.2.1

you can configure schema.xml

  1. use copyfield combine title, description, keywords single field, , search on field.
  2. use edgengramfilter filter break works fragments match sql behaviour.

e.g.

<fieldtype name="text" class="solr.textfield" positionincrementgap="100">     <analyzer>         <tokenizer class="solr.whitespacetokenizerfactory"/>         <filter class="solr.edgengramfilterfactory" mingramsize="2" maxgramsize="25" />         <filter class="solr.lowercasefilterfactory"/>     </analyzer> </fieldtype>   <field name="all_fields" type="text" indexed="true" stored="false" multivalued="true"/>  <copyfield source="title" dest="all_fields"/>  ............... 

Comments