You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Brett J (JIRA)" <ji...@apache.org> on 2010/07/07 19:06:52 UTC

[jira] Created: (LUCENENET-370) boosting fields when creating index document no longer seems to work in 2.9.*

boosting fields when creating index document no longer seems to work in 2.9.*
-----------------------------------------------------------------------------

                 Key: LUCENENET-370
                 URL: https://issues.apache.org/jira/browse/LUCENENET-370
             Project: Lucene.Net
          Issue Type: Bug
         Environment: XP  VS2010 c#
            Reporter: Brett J


Hello,
there seems to be an issue with boosting document fields in 2.9.*.
If I switch the lucene DLL back to 2.4.0.2 it works fine, but when I change to 2.9.* or above, the boost no longer seems to have an effect on the query results.

i.e 
Field fldContent = new Field("f1", value, Field.Store.YES, Field.Index.ANALYZED);
fldContent.SetBoost(1000)


Field fldContent = new Field("f2", value, Field.Store.YES, Field.Index.ANALYZED);
fldContent.SetBoost(1)

A prefix query searching both f1 and f2 should always return f1 matches with a higher score and at the top of the results, this seems to be broken in 2.9.*.
If you add the boost to the query itself and not the field it works correctly, but this is slower and we want to avoid it.
We had to downgrade back to 2.4.0.2 to get around the issue

cheers
Brett


..



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LUCENENET-370) boosting fields when creating index document no longer seems to work in 2.9.*

Posted by "Brett J (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887337#action_12887337 ] 

Brett J commented on LUCENENET-370:
-----------------------------------

Hi DIGY,
thanks for the tip. When I added this setting it works as we expected.
Thanks a lot, we are now upgrading to 2.9.2.2 again.

cheers
Brett.

> boosting fields when creating index document no longer seems to work in 2.9.*
> -----------------------------------------------------------------------------
>
>                 Key: LUCENENET-370
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-370
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: XP  VS2010 c#
>            Reporter: Brett J
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Hello,
> there seems to be an issue with boosting document fields in 2.9.*.
> If I switch the lucene DLL back to 2.4.0.2 it works fine, but when I change to 2.9.* or above, the boost no longer seems to have an effect on the query results.
> i.e 
> Field fldContent = new Field("f1", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1000)
> Field fldContent = new Field("f2", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1)
> A prefix query searching both f1 and f2 should always return f1 matches with a higher score and at the top of the results, this seems to be broken in 2.9.*.
> If you add the boost to the query itself and not the field it works correctly, but this is slower and we want to avoid it.
> We had to downgrade back to 2.4.0.2 to get around the issue
> cheers
> Brett
> ..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LUCENENET-370) boosting fields when creating index document no longer seems to work in 2.9.*

Posted by "Digy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12887084#action_12887084 ] 

Digy commented on LUCENENET-370:
--------------------------------

Hi Brett,

Have you tested Lucene.Net 2.9.X using *queryParser.SetMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE)* ?

DIGY

> boosting fields when creating index document no longer seems to work in 2.9.*
> -----------------------------------------------------------------------------
>
>                 Key: LUCENENET-370
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-370
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: XP  VS2010 c#
>            Reporter: Brett J
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Hello,
> there seems to be an issue with boosting document fields in 2.9.*.
> If I switch the lucene DLL back to 2.4.0.2 it works fine, but when I change to 2.9.* or above, the boost no longer seems to have an effect on the query results.
> i.e 
> Field fldContent = new Field("f1", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1000)
> Field fldContent = new Field("f2", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1)
> A prefix query searching both f1 and f2 should always return f1 matches with a higher score and at the top of the results, this seems to be broken in 2.9.*.
> If you add the boost to the query itself and not the field it works correctly, but this is slower and we want to avoid it.
> We had to downgrade back to 2.4.0.2 to get around the issue
> cheers
> Brett
> ..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (LUCENENET-370) boosting fields when creating index document no longer seems to work in 2.9.*

Posted by "Brett J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett J resolved LUCENENET-370.
-------------------------------

    Resolution: Not A Problem

If you use:

queryParser.SetMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE) 

it works as expected

> boosting fields when creating index document no longer seems to work in 2.9.*
> -----------------------------------------------------------------------------
>
>                 Key: LUCENENET-370
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-370
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: XP  VS2010 c#
>            Reporter: Brett J
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Hello,
> there seems to be an issue with boosting document fields in 2.9.*.
> If I switch the lucene DLL back to 2.4.0.2 it works fine, but when I change to 2.9.* or above, the boost no longer seems to have an effect on the query results.
> i.e 
> Field fldContent = new Field("f1", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1000)
> Field fldContent = new Field("f2", value, Field.Store.YES, Field.Index.ANALYZED);
> fldContent.SetBoost(1)
> A prefix query searching both f1 and f2 should always return f1 matches with a higher score and at the top of the results, this seems to be broken in 2.9.*.
> If you add the boost to the query itself and not the field it works correctly, but this is slower and we want to avoid it.
> We had to downgrade back to 2.4.0.2 to get around the issue
> cheers
> Brett
> ..

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.