DisMax is an abbreviation Disjunction Max, and is a popular query mode with Solr.

Simply put, it's your choice for all user generated queries.

Out of the box, Solr uses the standard Solr query parser which is pretty stupid, understanding only syntactically correct boolean queries like "title:foo OR body:foo", it can only search one field by default, and it may very well throw an exception in your face if you put in some characters it does not like.

Therefore a new, more robust query mode was needed and the DisMax and ExtendedDisMax Query Parsers were born. They are designed to process simple user entered phrases (without heavy syntax) and search for the individual words across several fields using different weighting (boosts) based on the significance of each field, and it should never throw an exception.

Disjunction refers to the fact that your search is executed across multiple fields, e.g. title, body and keywords, with different relevance weights

Max means that if your word "foo" matches both title and body, the max score of these two (probably title match) is added to the score, not the sum of the two as a simple OR query would do. This gives more control over your ranking.

DisMax is usually the short name for the actual query parser, so don't be confused. The old DisMax parser has been around for some time, while the new and more advanced ExtendedDisMax parser was introduced in <!> Solr3.1 as experimental.

There is a Lucid Imagination Blog post that explains the origins and conceptual behavior of dismax functionality.

DisMax (last edited 2012-01-19 08:45:42 by JanHoydahl)