How do I sort in solr by term frequency in multiple fields?

Posted by user1488380 on Stack Overflow See other posts from Stack Overflow or by user1488380
Published on 2012-07-09T15:11:32Z Indexed on 2012/07/09 15:15 UTC
Read the original article Hit count: 362

Filed under:

I have been assigned a task that I should change our solr search to sort a list returned by solr by using the term frequency.

Well, I´ve found a way to do so simply by using omitNorms="true".

The problem is, that this won´t work when I am doing a field - search, say by name:

q=name:jones

Following this example I get a list of document whose term frequency is the highest for the "name" field. But What I wanted to achieve is to have a query that is giving my a list of documents whose term frequency is the highest for ALL fields.

Example: If a User named Jones also has the word "Jones" in his biography 10 times I want that document ranked higher.

Is that possible ?

© Stack Overflow or respective owner

Related posts about solr