Sunday 15 May 2011

mysql - Solr field:needle or q=needle&qf=field different results -



mysql - Solr field:needle or q=needle&qf=field different results -

let's i'm trying search 'douglas' in field. if do:

solr/query?q=douglas

i 0 responses, if do:

solr/query?q=firstname:douglas

then responses, why this? i've tried:

solr/query?q=douglas&qf=firstname

which still gives me nothing. how search fields? how 'boost' relevancy of fields? example, if search douglas, people called douglas should come before items word 'douglas' in description.

you've got 2 concept mixed here.

the default search goes against 1 field. that's field defined df (default field) parameter (not qf). so, solr/query?q=douglas&df=firstname should have worked. solr examples have text field set default , copyfield instructions re-create other fields that. works, not allow utilize different analyzers different fields. nor allow ranking based on field content found in.

if want search multiple fields different weights, need switch dismax or edismax query parser. then, utilize qf parameter show fields search through.

you can experiment of in solr admin ui.

mysql solr

No comments:

Post a Comment