[jira] Created: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
----------------------------------------------------------------------------------------

                 Key: LUCENE-703
                 URL: http://issues.apache.org/jira/browse/LUCENE-703
             Project: Lucene - Java
          Issue Type: Improvement
          Components: QueryParser
    Affects Versions: 2.1
            Reporter: Mark Harwood
            Priority: Minor
         Attachments: patch.diff

Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
for range queries. This implementation is generally preferable because it
a) Runs faster
b) Does not have the scarcity of range terms unduly influence score
c) avoids any "TooManyBooleanClauses" exception.

However, if applications really need to use the old-fashioned RangeQuery and the above
points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.

The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/LUCENE-703?page=all ]

Mark Harwood updated LUCENE-703:
--------------------------------

    Attachment: patch.diff

Change to QueryParser and associated JUnit test

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-703?page=comments#action_12445991 ]
           
Yonik Seeley commented on LUCENE-703:
-------------------------------------

Looks OK to me.... Solr has had this from the start, but it was unclear if Lucene folks wanted to break scoring backward compatibility (including disabling index-time boosts).

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-703?page=comments#action_12446267 ]
           
Mark Harwood commented on LUCENE-703:
-------------------------------------

In my opinion the positives of this change outweigh the negatives but  is it worth consulting the java-user mailing list and canvassing  opinion before committing?

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-703?page=comments#action_12446400 ]
           
Hoss Man commented on LUCENE-703:
---------------------------------

If we're going to do this, do we want to add support for "*" like SolrQueryParser has...

https://svn.apache.org/viewvc/incubator/solr/trunk/src/java/org/apache/solr/search/SolrQueryParser.java?view=markup

ie...

   fieldName:[a TO *]
   fieldName:[* TO z]


> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-703?page=comments#action_12446837 ]
           
Otis Gospodnetic commented on LUCENE-703:
-----------------------------------------

I'm too tired to look at the patch, but I am +1 for this change in principal.  Voted for it in JIRA, too.

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
    [ http://issues.apache.org/jira/browse/LUCENE-703?page=comments#action_12449813 ]
           
Mark Harwood commented on LUCENE-703:
-------------------------------------

So two +1s for this patch and no objections so far.  

Last call - if there's no more comments I'll commit this later.

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (LUCENE-703) Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org
     [ http://issues.apache.org/jira/browse/LUCENE-703?page=all ]

Mark Harwood closed LUCENE-703.
-------------------------------

    Resolution: Fixed

> Change QueryParser to use ConstantScoreRangeQuery in preference to RangeQuery by default
> ----------------------------------------------------------------------------------------
>
>                 Key: LUCENE-703
>                 URL: http://issues.apache.org/jira/browse/LUCENE-703
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: QueryParser
>    Affects Versions: 2.1
>            Reporter: Mark Harwood
>            Priority: Minor
>         Attachments: patch.diff
>
>
> Change to QueryParser to default to using new ConstantScoreRangeQuery in preference to RangeQuery
> for range queries. This implementation is generally preferable because it
> a) Runs faster
> b) Does not have the scarcity of range terms unduly influence score
> c) avoids any "TooManyBooleanClauses" exception.
> However, if applications really need to use the old-fashioned RangeQuery and the above
> points are not required then the  "useOldRangeQuery" property can be used to revert to old behaviour.
> The patch includes extra Junit tests for this flag and all other Junit tests pass

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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