[ 
https://issues.apache.org/jira/browse/LUCENE-6590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15324676#comment-15324676
 ] 

Upayavira commented on LUCENE-6590:
-----------------------------------

Here's an example for 4.10 and the same query against 5.5 - note, it is a 
different doc though:

{code}
4.10 score ========================================================
      "2937439": {
        "match": true,
        "value": 5.5993805,
        "description": "weight(description:obama in 394012)
        [DefaultSimilarity], result of:",
        "details": [
          {
            "match": true,
            "value": 5.5993805,
            "description": "fieldWeight in 394012, product of:",
            "details": [
              {
                "match": true,
                "value": 1,
                "description": "tf(freq=1.0), with freq of:",
                "details": [
                  {
                    "match": true,
                    "value": 1,
                    "description": "termFreq=1.0"
                  }
                ]
              },
              {
                "match": true,
                "value": 5.5993805,
                "description": "idf(docFreq=56010, maxDocs=5568765)"
              },
              {
                "match": true,
                "value": 1,
                "description": "fieldNorm(doc=394012)"
              }
            ]
          }
        ]
5.5 score ========================================================
      "2502281":{
        "match":true,
        "value":28.51136,
        "description":"weight(description:obama in 43472) [], result
        of:",
        "details":[{
            "match":true,
            "value":28.51136,
            "description":"score(doc=43472,freq=1.0), product of:",
            "details":[{
                "match":true,
                "value":5.339603,
                "description":"queryWeight, product of:",
                "details":[{
                    "match":true,
                    "value":5.339603,
                    "description":"idf(docFreq=31905,
                    maxDocs=2446459)"},
                  {
                    "match":true,
                    "value":1.0,
                    "description":"queryNorm"}]},
              {
                "match":true,
                "value":5.339603,
                "description":"fieldWeight in 43472, product of:",
                "details":[{
                    "match":true,
                    "value":1.0,
                    "description":"tf(freq=1.0), with freq of:",
                    "details":[{
                        "match":true,
                        "value":1.0,
                        "description":"termFreq=1.0"}]},
                  {
                    "match":true,
                    "value":5.339603,
                    "description":"idf(docFreq=31905,
                    maxDocs=2446459)"},
                  {
                    "match":true,
                    "value":1.0,
                    "description":"fieldNorm(doc=43472)"}]}]}]},
{code}

> Explore different ways to apply boosts
> --------------------------------------
>
>                 Key: LUCENE-6590
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6590
>             Project: Lucene - Core
>          Issue Type: Wish
>            Reporter: Adrien Grand
>            Priority: Minor
>             Fix For: 5.4
>
>         Attachments: LUCENE-6590.patch, LUCENE-6590.patch, LUCENE-6590.patch, 
> LUCENE-6590.patch, LUCENE-6590.patch, LUCENE-6590.patch, LUCENE-6590.patch
>
>
> Follow-up from LUCENE-6570: the fact that all queries are mutable in order to 
> allow for applying a boost raises issues since it makes queries bad cache 
> keys since their hashcode can change anytime. We could just document that 
> queries should never be modified after they have gone through IndexSearcher 
> but it would be even better if the API made queries impossible to mutate at 
> all.
> I think there are two main options:
>  - either replace "void setBoost(boost)" with something like "Query 
> withBoost(boost)" which would return a clone that has a different boost
>  - or move boost handling outside of Query, for instance we could have a 
> (immutable) query impl that would be dedicated to applying boosts, that 
> queries that need to change boosts at rewrite time (such as BooleanQuery) 
> would use as a wrapper.
> The latter idea is from Robert and I like it a lot given how often I either 
> introduced or found a bug which was due to the boost parameter being ignored. 
> Maybe there are other options, but I think this is worth exploring.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to