Have a string
type field named doctype
which can take values blog
, event
and anything in future.
&bq=cat:electronics^5.0
&bq=sponsored:true
&bq=doctype:blog^5.0
Which means the score of documents of field doctype
and value blog
gets boosted. The 5.0
is boost weight, useful when one condition is more important than another.
Adapted from this http://wiki.apache.org/solr/ExtendedDisMax#Examples
And from http://wiki.apache.org/solr/SolrRelevancyFAQ see 11.1 for promoting content to the top; and 12 for boosting according to values of something.
And use asynchronous HTTP calls if you want to make multiple queries to render a single page. If you make 3 queries each of 333ms one after another, your page will take a second to load. But with 3 asynchronous queries, it will be more like 340ms. But it may be tough in PHP!