So, what you want is to have the same exact results set as if the query was
"scientific", but the documents that also match Field1:[20 TO 30] to have
more score, right?

On Wed, Jul 20, 2011 at 10:53 AM, Sowmya V.B. <vbsow...@gmail.com> wrote:

> Hi Tomas
>
> Here is what I was trying to give.
>
>
> http://localhost:8085/apache-solr-3.3.0/select?indent=on&version=2.2&defType=dismax&q=scientific&bq=Field1:[20%20TO%2030]
> ^10&start=0&rows=30&qf=text&fl=Field1,docid&debugQuery=on
>

This query seems OK for that purpose.

>
> Over here, I was trying to change the range of Field1, keeping everything
> else intact. Here are my observations:
>
> 1) The number of results found remain intact. Only that the order of the
> results varies.
>
Isn't this what was expected?


> 2) The boost factor (10) does not seem to throw any influence at all.
>
It's on the parsed query, Why do you think it doesn't have an influence? Can
you send the debug query output for a document that match the bt?
I tried it with the Solr example and this is what I see:

http://localhost:8983/solr/select?defType=dismax&q=display&bq=weight:[0%20TO%2010]
^10&start=0&rows=30&debugQuery=on&qf=features%20name

This is the debug output for a document that match the query and the boost
query:

<str name="MA147LL/A">

1.137027 = (MATCH) sum of:
  0.1994111 = (MATCH) max of:
    0.1994111 = (MATCH) weight(features:display in 0), product of:
      0.34767273 = queryWeight(features:display), product of:
        3.7080503 = idf(docFreq=1, maxDocs=30)
        0.0937616 = queryNorm
      0.57355976 = (MATCH) fieldWeight(features:display in 0), product of:
        1.4142135 = tf(termFreq(features:display)=2)
        3.7080503 = idf(docFreq=1, maxDocs=30)
        0.109375 = fieldNorm(field=features, doc=0)
  0.937616 = (MATCH) ConstantScore(weight:[0.0 TO 10.0]^10.0)^10.0, product of:
    10.0 = boost
    0.0937616 = queryNorm
</str>

and this is the debug output for a document that only match the main query:

<str name="VA902B">
0.4834455 = (MATCH) sum of:
  0.4834455 = (MATCH) max of:
    0.4834455 = (MATCH) weight(name:display in 12), product of:
      0.34767273 = queryWeight(name:display), product of:
        3.7080503 = idf(docFreq=1, maxDocs=30)
        0.0937616 = queryNorm
      1.3905189 = (MATCH) fieldWeight(name:display in 12), product of:
        1.0 = tf(termFreq(name:display)=1)
        3.7080503 = idf(docFreq=1, maxDocs=30)
        0.375 = fieldNorm(field=name, doc=12)
</str>

Do you have something similar??



> Here is what the debugQuery says:
> <str name="parsedquery">+DisjunctionMaxQuery((text:scientif)) ()
> Field1:[20.0 TO 30.0]^10.0</str>
> <str name="parsedquery_toString">+(text:scientif) () Field1:[20.0 TO
> 30.0]^10.0</str>
>
> From these, it seems like its just filtering the results based on the
> Field1
> values, rather than performing a Boost Query.
>
> S.
>
> 2011/7/20 Tomás Fernández Löbbe <tomasflo...@gmail.com>
>
> > Yes, it should,  but make sure you specify at least the "qf" parameter
> for
> > dismax. You can activate debugQuery and you'll see which documents get
> > boosted and which aren't.
> >
> > On Wed, Jul 20, 2011 at 9:21 AM, Sowmya V.B. <vbsow...@gmail.com> wrote:
> >
> > > Hi Tomasso
> > >
> > > Thanks for a quick response.
> > >
> > > So, if I say:
> > > http://localhost:8085/apache-solr-3.3.0/select?indent=on&version=2.2*
> > >
> &defType=dismax*&q=scientific&bq=Field1:[20%20TO%2025]^10&start=0&rows=30
> > > -will it be right?
> > >
> > > The above query: boosts the documents which suit the given query
> > > ("scientific"), which has Field1 values between 20-25, by a factor of
> 10
> > :
> > > Is that right??
> > >
> > > S
> > >
> > > 2011/7/20 Tomás Fernández Löbbe <tomasflo...@gmail.com>
> > >
> > > > Hi Sowmya, "bq" is a great way of boosting, but you have to be using
> > the
> > > > Dismax Query Parser or the Extended Dismax (edismax) query parser, it
> > > > doesn't work with the Lucene Query Parser. If you can use any of
> those,
> > > > then
> > > > that's the solution. If you need to use the Lucene Query Parser, for
> a
> > > user
> > > > query like:
> > > >
> > > > scientific temper
> > > >
> > > > you could create a query like:
> > > >
> > > > (scientific temper) OR (scientific temper AND (field1:[10 TO
> 2030]))^X
> > > >
> > > > being "X" the boost you want for those documents.
> > > >
> > > > with your query:
> > > > scientific temper field1:[10 TO 2030]
> > > >
> > > > you are either adding the condition of the range value for the field
> > (if
> > > > your default operator is AND) or adding another way of matching the
> > query
> > > > (if your default operator ir OR, you can have documents in your
> result
> > > set
> > > > that only matched the range query, and this is not what the user
> > wanted).
> > > >
> > > > Hope this helps,
> > > >
> > > > Tomás
> > > >
> > > > On Wed, Jul 20, 2011 at 5:15 AM, Sowmya V.B. <vbsow...@gmail.com>
> > wrote:
> > > >
> > > > > Can anyone throw some light on this issue?
> > > > >
> > > > > My problem is to: give a query time boost to certain documents,
> which
> > > > have
> > > > > a
> > > > > field, say field1, in the range that the user chooses during query
> > > time.
> > > > I
> > > > > think the below link indicates a range query:
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8085/solr/select?indent=on&version=2.2&q=scientific+temper+field1:[10%20TO%2030]&start=0&rows=10
> > > > >
> > > > > But, apart from that, how can I indicate a boost for the condition
> > > > > field1:[10%20TO%2030]?
> > > > >
> > > > > I tried using a &bq=field1:[20 TO 25] and also &bq=field1:[20 TO
> > 25]^10
> > > > > -But I am not able to figure out what these two mean, from the
> > results.
> > > > > Because, i get top1 result as a document where field1 is 40..in
> this
> > > > > case..after using &bq clause. I increased the boost to 10,20,50
> > > 100..but
> > > > > the
> > > > > results dont change at all.
> > > > >
> > > > > S.
> > > > >
> > > > > On Tue, Jul 19, 2011 at 4:28 PM, Sowmya V.B. <vbsow...@gmail.com>
> > > wrote:
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > Is query time boosting possible in Solr?
> > > > > >
> > > > > > Here is what I want to do: I want to boost the ranking of certain
> > > > > > documents, which have their relevant field values, in a
> particular
> > > > range
> > > > > > (selected by user at query time)...
> > > > > >
> > > > > > when I do something like:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8085/solr/select?indent=on&version=2.2&q=scientific+temper&fq=field1:[10%20TO%2030]&start=0&rows=10
> > > > > > -I guess, it is just a filter over the normal results and not
> > exactly
> > > a
> > > > > > query.
> > > > > >
> > > > > > I tried giving this:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://localhost:8085/solr/select?indent=on&version=2.2&q=scientific+temper+field1:[10%20TO%2030]&start=0&rows=10
> > > > > > -This still worked and gave me different results. But, I did not
> > > quite
> > > > > > understand what this second query meant. Does it mean: "Rank
> those
> > > > > documents
> > > > > > with field1 value in 10-30 better than those without" ?
> > > > > >
> > > > > > S
> > > > > > --
> > > > > > Sowmya V.B.
> > > > > > ----------------------------------------------------
> > > > > > Losing optimism is blasphemy!
> > > > > > http://vbsowmya.wordpress.com
> > > > > > ----------------------------------------------------
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Sowmya V.B.
> > > > > ----------------------------------------------------
> > > > > Losing optimism is blasphemy!
> > > > > http://vbsowmya.wordpress.com
> > > > > ----------------------------------------------------
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Sowmya V.B.
> > > ----------------------------------------------------
> > > Losing optimism is blasphemy!
> > > http://vbsowmya.wordpress.com
> > > ----------------------------------------------------
> > >
> >
>
>
>
> --
> Sowmya V.B.
> ----------------------------------------------------
> Losing optimism is blasphemy!
> http://vbsowmya.wordpress.com
> ----------------------------------------------------
>

Reply via email to