Advanced query parameters
Alternative queries are used when the query parameter is either blank or not specified. Solarium by default sets the query parameter as *:*
. Alternative queries can be used to get all documents from an index for faceting purposes.
$dismax->setQueryAlternative('*:*');
For selecting all documents in DisMax/eDisMax, the normal query syntax *:*
does not work. To select all documents, set the default query value in Solarium query to empty string. This is required as the default query in Solarium is *:*
. Also set the alternative query to *:*
. DisMax/eDisMax normal query syntax does not support *:*
, but the alternative query syntax does.