[ 
https://issues.apache.org/jira/browse/LUCENENET-513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hadrien HUGOT updated LUCENENET-513:
------------------------------------

          Component/s: Lucene.Net Core
          Description: 
Regression between Lucene 2.9.4g and Lucene 3.0.3 in the method GetFieldQuery 
of MultiFieldQueryParser with the boosts factor.

public class MultiFieldQueryParser : QueryParser {

   protected internal override Query GetFieldQuery(string field, string 
queryText, int slop)
        {
 ...
                        //If the user passes a map of boosts
                        if (boosts != null)
                        {
                            //Get the boost from the map and apply them
                            Single boost = boosts[fields[i]];
                            q.Boost = boost;
                        }
...

If all fields don't have a boost factor an exception is throw by "Single boost 
= boosts[fields[i]];"
In version 2.9.4g, a check was performed, and no boost were apply if the field 
is not boosted.

    Affects Version/s: Lucene.Net 3.0.3
              Summary: GetFieldQuery in MultiFieldQueryParser not handle 
properly Boosts  (was: GetFieldQuery in MultiFieldQueryParser )
    
> GetFieldQuery in MultiFieldQueryParser not handle properly Boosts
> -----------------------------------------------------------------
>
>                 Key: LUCENENET-513
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-513
>             Project: Lucene.Net
>          Issue Type: Bug
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 3.0.3
>            Reporter: Hadrien HUGOT
>
> Regression between Lucene 2.9.4g and Lucene 3.0.3 in the method GetFieldQuery 
> of MultiFieldQueryParser with the boosts factor.
> public class MultiFieldQueryParser : QueryParser {
>    protected internal override Query GetFieldQuery(string field, string 
> queryText, int slop)
>         {
>  ...
>                         //If the user passes a map of boosts
>                         if (boosts != null)
>                         {
>                             //Get the boost from the map and apply them
>                             Single boost = boosts[fields[i]];
>                             q.Boost = boost;
>                         }
> ...
> If all fields don't have a boost factor an exception is throw by "Single 
> boost = boosts[fields[i]];"
> In version 2.9.4g, a check was performed, and no boost were apply if the 
> field is not boosted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to