solr - Default search on all fields -
i can solr work when include field in query, example:
http://localhost:8983/solr/collection1/select?q=lastname:johnson the above query returns approximately 18 results.
shouldn't possible use solr (/lucene) without specifying field? such as:
http://localhost:8983/solr/collection1/select?q=johnson i tried adding fields list:
http://localhost:8983/solr/collection1/select?q=johnson&fl=cus_id%2cinitials%2clastname%2cpostcode%2ccity but these queries return 0 results.
these fields schema.xml:
<field name="cus_id" type="string" indexed="true" stored="true"/> <field name="initials" type="text_general" indexed="true" stored="true" /> <field name="lastname" type="text_general" indexed="true" stored="true"/> <field name="postcode" type="string" indexed="true" stored="true" /> <field name="city" type="text_general" indexed="true" stored="true"/> i don't know else try. suggestions?
for solr if not field specified search happens on default field (df).
when search q=johnson , debug query find searching on default field field text.
can copyfield fields single field text , have default field (if not default already), search queries searched across default field.
also, fl lists fields returned part of result , not related fields on search performed.
dismax, can check qf param specify multiple fields variable boosts.
Comments
Post a Comment