You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 14:38:40 UTC

[jira] [Created] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

IllegalArgumentException when using useFilterForSortedQuery on an empty index
-----------------------------------------------------------------------------

                 Key: SOLR-2923
                 URL: https://issues.apache.org/jira/browse/SOLR-2923
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 3.6, 4.0
            Reporter: Adrien Grand
            Priority: Trivial


An IllegalArgumentException can occur under the following circumstances:
 - the index is empty,
 - {{useFilterForSortedQuery}} is enabled,
 - {{queryResultsCache}} is disabled.

Here are what the exception and its stack trace look like (Solr trunk):

{quote}
numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count

java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
	...
{quote}

To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

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

Adrien Grand updated SOLR-2923:
-------------------------------

    Attachment: SOLR-2923.patch

This patch fixes the issue.
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Priority: Trivial
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

Posted by "Adrien Grand (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280472#comment-13280472 ] 

Adrien Grand commented on SOLR-2923:
------------------------------------

Could someone review this patch?
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Priority: Trivial
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

Posted by "Adrien Grand (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283559#comment-13283559 ] 

Adrien Grand commented on SOLR-2923:
------------------------------------

Hi Mark, thanks for the review!
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Assignee: Mark Miller
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

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

Mark Miller resolved SOLR-2923.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

Thanks Adrien!
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Assignee: Mark Miller
>            Priority: Trivial
>             Fix For: 4.0
>
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283493#comment-13283493 ] 

Mark Miller commented on SOLR-2923:
-----------------------------------

patch looks good to me
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Assignee: Mark Miller
>            Priority: Trivial
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Assigned] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

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

Mark Miller reassigned SOLR-2923:
---------------------------------

    Assignee: Mark Miller
    
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Assignee: Mark Miller
>            Priority: Trivial
>         Attachments: SOLR-2923.patch
>
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (SOLR-2923) IllegalArgumentException when using useFilterForSortedQuery on an empty index

Posted by "Stefan Will (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13183718#comment-13183718 ] 

Stefan Will commented on SOLR-2923:
-----------------------------------

This also affects 3.5
                
> IllegalArgumentException when using useFilterForSortedQuery on an empty index
> -----------------------------------------------------------------------------
>
>                 Key: SOLR-2923
>                 URL: https://issues.apache.org/jira/browse/SOLR-2923
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Adrien Grand
>            Priority: Trivial
>
> An IllegalArgumentException can occur under the following circumstances:
>  - the index is empty,
>  - {{useFilterForSortedQuery}} is enabled,
>  - {{queryResultsCache}} is disabled.
> Here are what the exception and its stack trace look like (Solr trunk):
> {quote}
> numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> java.lang.IllegalArgumentException: numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count
> 	at org.apache.lucene.search.TopFieldCollector.create(TopFieldCollector.java:917)
> 	at org.apache.solr.search.SolrIndexSearcher.sortDocSet(SolrIndexSearcher.java:1741)
> 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1211)
> 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:353)
> 	...
> {quote}
> To reproduce this error from a fresh copy of Solr trunk, edit {{example/solr/conf/solrconfig.xml}} to disable {{queryResultCache}} and enable {{useFilterForSortedQuery}}. Then run {{ant run-example}} and issue a query which sorts against any field ({{http://localhost:8983/solr/select?q=*:*&sort=manu+desc}} for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org