Hi Ravi,

with dismax, use the parameter "q.alt" which expects standard lucene
syntax (instead of "q"). If "q.alt" is present in the query, "q" is not
required. Add the parameter "qt=dismax".

Chantal

On Thu, 2010-09-16 at 06:22 +0200, Ravi Kiran wrote:
> Hello Mr.Rochkind,
>                            I am using StandardRequestHandler so I presume I
> cannot use bq param right ?? Is there a way we can mix dismax and
> standardhandler i.e use lucene syntax for query and use dismax style for bq
> using localparams/nested queries? I remember seeing your post related to
> localparams and nested queries and got thoroughly confused
> 
> On Wed, Sep 15, 2010 at 10:28 PM, Jonathan Rochkind <rochk...@jhu.edu>wrote:
> 
> > Maybe you are looking for the 'bq' (boost query) parameter in dismax?
> >
> > http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29
> > ________________________________________
> > From: Ravi Kiran [ravi.bhas...@gmail.com]
> > Sent: Wednesday, September 15, 2010 10:02 PM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Boosting specific field value
> >
> > Erick,
> >         I afraid you misinterpreted my issue....if I query like you said
> > i.e q=source(bbc OR "associated press")^10  I will ONLY get documents with
> > source BBC or Associated Press...what I am asking is - if my query query
> > does not deal with source at all but uses some other field...since the
> > field
> > "source" will be in the result , is there a way to still boost such a
> > document
> >
> > To re-iterate, If my query is as follows
> >
> > q=primarysection:(Politics* OR Nation*)&fq=contenttype:("Blog" OR "Photo
> > Gallery") pubdatetime:[NOW-3MONTHS TO NOW]
> >
> > and say the resulting docs have "source" field, is there any way I can
> > boost
> > the resulting doc/docs that have either BBC/Associated Press as the value
> > in
> > source field to be on top
> >
> > Can a filter query (fq) have a boost ? if yes, then probably I could
> > rewrite
> > the query as follows in a round about way
> >
> > q=primarysection:(Politics* OR Nation*)&fq=contenttype:("Blog" OR "Photo
> > Gallery) pubdatetime:[NOW-3MONTHS TO NOW] (source:("BBC" OR "Associated
> > Press")^10 OR -source:("BBC" OR "Associated Press")^5)
> >
> > Theoretically, I have to write source in the fq 2 times as I need docs that
> > have source values too just that they will have a lower boost
> >
> > Thanks,
> >
> > Ravi Kiran Bhaskar
> >
> > On Wed, Sep 15, 2010 at 1:34 PM, Erick Erickson <erickerick...@gmail.com
> > >wrote:
> >
> > > This seems like a simple query-time boost, although I may not be
> > > understanding
> > > your problem well. That is, q=source(bbc OR "associated press")^10
> > >
> > > As for boosting more recent documents, see:
> > >
> > >
> > http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents
> > >
> > > HTH
> > > Erick
> > >
> > >
> > > On Wed, Sep 15, 2010 at 12:44 PM, Ravi Kiran <ravi.bhas...@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >        I am currently querying solr for a "*primarysection*" which will
> > > > return documents like - *q=primarysection:(Politics* OR
> > > > Nation*)&fq=contenttype:("Blog" OR "Photo Gallery)
> > > pubdatetime:[NOW-3MONTHS
> > > > TO NOW]"*. Each document has several fields of which I am most
> > interested
> > > > in
> > > > single valued field called "*source*" ...I want to boost documents
> > which
> > > > contain "*source*" value say "Associated Press" OR "BBC" and also by
> > > newer
> > > > documents. The returned documents may have several other source values
> > > > other
> > > > than "BBC" or "Associated Press". since I specifically don't query on
> > > these
> > > > source values I am not sure how I can boost them, Iam using *
> > > > StandardRequestHandler*
> > > >
> > >
> >



Reply via email to