eDisMax qf - Which Fields Count and How Much

Configuration

qf decides where the words a user typed are looked for, and how much a match in each field is worth.

qf is a space-separated list of fields, each with an optional ^ weight. It answers one question: where do the user's words get looked up, and whose opinion matters most.

qf=title^3.0 summary^1.5 text_all^0.5
USER TERMphilosophytitle^3.0summary^1.5text_all^0.5FIELD SCOREThe best field score wins. The tie parameter adds back a fraction of the others.

One term, three fields, three weights. The highest field score is carried forward.

Here is what Solr reports for a four-term query over two fields. Each term becomes its own DisjunctionMaxQuery, and the weights are attached per field, not per term:

q=solr search index tuning
defType=edismax
qf=title^2 text

parsedquery:
+(DisjunctionMaxQuery((text:solr | (title:solr)^2.0))
  DisjunctionMaxQuery((text:search | (title:search)^2.0))
  DisjunctionMaxQuery((text:index | (title:index)^2.0))
  DisjunctionMaxQuery((text:tune | (title:tune)^2.0)))

Two things worth reading out of that output. The vertical bar is the disjunction: the field with the best score wins the term. And tuning came back as tune, because the field's analyzer stems it — qf can only reach fields whose analysis chain produces the token the user is looking for.

Weights are relative, not absolute. title^3 summary^1 and title^30 summary^10 rank identically. Change ratios, not magnitudes.

The eDisMax query parser

qf: which fields count, and how much (this page)