[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005412#comment-16005412 ] Judith Silverman edited comment on SOLR-6203 at 5/10/17 9:03 PM: - Short and sweet. I see from the diff that we still haven't standardized nomenclature in the master branch: "Sort withinGroupSort = rb.getGroupingSpec().getSortWithinGroup();" I thought you had already split out a patch for that, but I must be thinking of something else. Thanks, Judith was (Author: judith): Short and sweet. I see from the diff that we still haven't standardized nomenclature: "Sort withinGroupSort = rb.getGroupingSpec().getSortWithinGroup();" I thought you had already split out a patch for that, but I must be thinking of something else. Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005412#comment-16005412 ] Judith Silverman commented on SOLR-6203: Short and sweet. I see from the diff that we still haven't standardized nomenclature: "Sort withinGroupSort = rb.getGroupingSpec().getSortWithinGroup();" I thought you had already split out a patch for that, but I must be thinking of something else. Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16004618#comment-16004618 ] Judith Silverman commented on SOLR-6203: Hi, Christine. I have accepted your pull request to my branch, thanks. Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15980240#comment-15980240 ] Judith Silverman commented on SOLR-6203: Hi, Christine. I consolidated the DistributedQueryComponentCustomSortTest tests as you suggested and updated my pull request to your branch. Cheers, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15972725#comment-15972725 ] Judith Silverman commented on SOLR-6203: The restriction of yesterday's patch to SolrIndexSearcher.java is independent of the rest of the patch and addresses a defect introduced in SOLR-9660 (discussed above). That defect affects the value of an class member which is not used in the present master, but it breaks unit tests on the jira/solr-6203 branch if that branch's change to SolrIndexSearcher.java is reverted. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch Today's patch is based on commit 66715a476 to master in the lucene-solr repo (Mon Apr 17 11:08:53 2017). All unit tests pass, including those added in this patch which test the functionality this patch is designed to fix. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970458#comment-15970458 ] Judith Silverman commented on SOLR-6203: Hi, Christine. I merged from master though commit 00f0c30 to my fork of the jira/solr-6203 branch, resolved a conflict in TopGroupsFieldCommand.java, and committed. Unit tests all pass, including those added in previous commits to test the fix of the bug which is the subject of this jira. I closed the outstanding pull request and opened another. Is there anything else I can do to help move things along? Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884541#comment-15884541 ] Judith Silverman edited comment on SOLR-6203 at 3/24/17 2:54 PM: - Hi, Christine, thanks for the quick response. The code in QueryComponent.java which calls weightSort() in the non-grouped case (as opposed to the grouped case we are trying to fix) proceeds to iterate through sortSpec.getSchemaFields() without modifying that (immutable) list of SchemaFields at all: ... SortSpec sortSpec = rb.getSortSpec(); Sort sort = searcher.weightSort(sortSpec.getSort()); SortField[] sortFields = sort==null ? new SortField[]{SortField.FIELD_SCORE} : sort.getSort(); List schemaFields = sortSpec.getSchemaFields(); for (int fld = 0; fld < schemaFields.size(); fld++) { SchemaField schemaField = schemaFields.get(fld); FieldType ft = null == schemaField? null : schemaField.getType(); ... On the basis of that code, I would tentatively answer your questions as follows: Question #1: yes Question #2: the original SchemaField object(s) (I suspect that rewrite/weight does not turn a non-null into a null) The SortSpecParser adds a null to the SchemaFields list for any SortField that doesn't correspond to a plain old field, i.e. SortFields corresponding to ValueSource and FunctionQueries--- exactly the ones the weightSort()/rewrite()/createWeight() business is used to support, if I understand correctly (cf. SOLR-2533). (Sorts by score and lucene docid also get null schemaFields.) My understanding is that any SortField actually modified by rewrite() is associated to a null SchemaField to begin with, and that it would be inappropriate to replace that null with something else when we call rewrite() on the SortField. Our new utility functions will see that null and refrain from marshalling/unmarshalling. Cheers, Judith was (Author: judith): Hi, Christine, thanks for the quick response. The code in QueryComponent.java which calls weightSort() in the non-grouped case proceeds to iterate through sortSpec.getSchemaFields() without modifying that (immutable) list of SchemaFields at all: ...
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15940486#comment-15940486 ] Judith Silverman commented on SOLR-6203: Hi, Christine. Last weekend I merged from master through commit e7d9db9d6c4dccc158b52d535 to my local copy of our branch and ran 'ant clean test' twice. There were two failures the first time and none the second. Here are the tests that failed: org.apache.solr.cloud.CollectionsAPIDistributedZkTest.testTooManyReplicas org.apache.solr.cloud.OnlyLeaderIndexesTest.test The two tests modified on our branch, TestDistributedGrouping and DistributedQueryComponentCustomSortTest, both passed both times. I am attaching a patch for the second of these in which I remove some duplicated test cases and add some new ones. If you are holding out for an authoritative answer to your questions from 24Feb17, is there someone we could ask? Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15884541#comment-15884541 ] Judith Silverman commented on SOLR-6203: Hi, Christine, thanks for the quick response. The code in QueryComponent.java which calls weightSort() in the non-grouped case proceeds to iterate through sortSpec.getSchemaFields() without modifying that (immutable) list of SchemaFields at all: ... SortSpec sortSpec = rb.getSortSpec(); Sort sort = searcher.weightSort(sortSpec.getSort()); SortField[] sortFields = sort==null ? new SortField[]{SortField.FIELD_SCORE} : sort.getSort(); List schemaFields = sortSpec.getSchemaFields(); for (int fld = 0; fld < schemaFields.size(); fld++) { SchemaField schemaField = schemaFields.get(fld); FieldType ft = null == schemaField? null : schemaField.getType(); ... On the basis of that code, I would tentatively answer your questions as follows: Question #1: yes Question #2: the original SchemaField object(s) (I suspect that rewrite/weight does not turn a non-null into a null) The SortSpecParser adds a null to the SchemaFields list for any SortField that doesn't correspond to a plain old field, i.e. SortFields corresponding to ValueSource and FunctionQueries--- exactly the ones the weightSort()/rewrite()/createWeight() business is used to support, if I understand correctly (cf. SOLR-2533). (Sorts by score and lucene docid also get null schemaFields.) My understanding is that any SortField actually modified by rewrite() is associated to a null SchemaField to begin with, and that it would be inappropriate to replace that null with something else when we call rewrite() on the SortField. Our new utility functions will see that null and refrain from marshalling/unmarshalling. Cheers, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and
[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15881896#comment-15881896 ] Judith Silverman edited comment on SOLR-6203 at 2/24/17 4:02 AM: - Hi, Christine, are there changes you would like me to make to the patch dated 05Dec16? As I recall, your commit of 23Dec16 took us part of the way toward that patch. Do my concerns about SOLR_9660 (02Dec16 above) make sense? Thanks, Judith was (Author: judith): Hi, Christine, are there changes you would like me to make in the patch dated 05Dec16? As I recall, your commit of 23Dec16 took us part of the way toward that patch. Do my concerns about SOLR_9660 (02Dec16 above) make sense? Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15881896#comment-15881896 ] Judith Silverman commented on SOLR-6203: Hi, Christine, are there changes you would like me to make in the patch dated 05Dec16? As I recall, your commit of 23Dec16 took us part of the way toward that patch. Do my concerns about SOLR_9660 (02Dec16 above) make sense? Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203-unittest.patch, SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.15#6346) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15773821#comment-15773821 ] Judith Silverman commented on SOLR-6203: Hi, I see, you are separating the refactoring from the bug fix. I like the new name and the new place. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9660) in GroupingSpecification factor [group](sort|offset|limit) into [group](sortSpec)
[ https://issues.apache.org/jira/browse/SOLR-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15773399#comment-15773399 ] Judith Silverman commented on SOLR-9660: Hi, Christine, it's good to see all the updates! I haven't had time to do more than skim but I see that SOLR-9660 has been resolved with no new patches since 29Nov and I wanted to make sure that you saw my comment from 02Dec under SOLR-6203 about one of the patches for SOLR-9660. Maybe that's a non-issue or you are addressing it separately. Thanks, Judith > in GroupingSpecification factor [group](sort|offset|limit) into > [group](sortSpec) > - > > Key: SOLR-9660 > URL: https://issues.apache.org/jira/browse/SOLR-9660 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Fix For: 6.x, master (7.0) > > Attachments: SOLR-9660.patch, SOLR-9660.patch, SOLR-9660.patch, > SOLR-9660.patch > > > This is split out and adapted from and towards the SOLR-6203 changes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch Hi, Christine. I'm posting what I have so far; please review at your convenience. This afternoon's patch includes the changes from the patch of Dec. 3. I added calls to two new utility functions (which turned out to be identical, so if you approve them, they should be combined and put in a good place) and copied over unit tests from last year's patch, which pass. Cheers, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-9649: --- Attachment: SOLR-9649.patch [Deleting some unhelpful remarks about 'group.offset'---which evidently is not supported when group.format=simple---and about 'offset', which I saw in the patch tests and immediately conflated with 'start'.] > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch, SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-9649: --- Attachment: (was: SOLR-9649.patch) > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15718865#comment-15718865 ] Judith Silverman edited comment on SOLR-9649 at 12/4/16 4:10 AM: - Hi, Christine. I think the issue you noticed here is the subject of SOLR-5878. My diagnosis is that when group.format=simple in a distributed search, the value of 'rows' is interpreted as the number of groups to be represented in the result set rather than as the number of documents to be returned. I've added another failing unit test to your patch where the result set is smaller so that it's easier to see what's happening: rows=9 and group.limit=2, and the 9th group returned contains 2 docs, so a total of 10 docs are returned. was (Author: judith): Hi, Christine. I think the issue you noticed here is the subject of SOLR-5878. My diagnosis is that when group.format=simple in a distributed search, the value of 'rows' is interpreted as the number of groups to be represented in the result set rather than as the number of documents to be returned. I've added another failing unit test to your patch where the result set is smaller so that it's easier to see what's happening: rows=9 and group.limit=2, and the 9th group returned contains 2 docs, so a total of 10 docs are returned. Another issue illustrated by the tests you added is that both 'offset' and 'group.offset' are ignored, but this appears to be the case whether or not the search is distributed so long as group.format=simple, so these tests (which compare the results of distributed and non-distributed search) don't catch that problem. > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch, SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Issue Comment Deleted] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-9649: --- Comment: was deleted (was: Ah, I see this comment in TopGroupsShardResponseProcessor.java: // If group.format=simple group.offset doesn't make sense. Maybe 'offset' doesn't make sense then either?) > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch, SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15719136#comment-15719136 ] Judith Silverman commented on SOLR-9649: Ah, I see this comment in TopGroupsShardResponseProcessor.java: // If group.format=simple group.offset doesn't make sense. Maybe 'offset' doesn't make sense then either? > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch, SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-9649) Distributed grouping can return 'too many' results?
[ https://issues.apache.org/jira/browse/SOLR-9649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-9649: --- Attachment: SOLR-9649.patch Hi, Christine. I think the issue you noticed here is the subject of SOLR-5878. My diagnosis is that when group.format=simple in a distributed search, the value of 'rows' is interpreted as the number of groups to be represented in the result set rather than as the number of documents to be returned. I've added another failing unit test to your patch where the result set is smaller so that it's easier to see what's happening: rows=9 and group.limit=2, and the 9th group returned contains 2 docs, so a total of 10 docs are returned. Another issue illustrated by the tests you added is that both 'offset' and 'group.offset' are ignored, but this appears to be the case whether or not the search is distributed so long as group.format=simple, so these tests (which compare the results of distributed and non-distributed search) don't catch that problem. > Distributed grouping can return 'too many' results? > --- > > Key: SOLR-9649 > URL: https://issues.apache.org/jira/browse/SOLR-9649 > Project: Solr > Issue Type: Test > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9649.patch, SOLR-9649.patch > > > stumbled across this whilst looking at SOLR-6203 and trying to factor > {{GroupingSpecification.\[group\](sort|offset|limit)}} into > {{GroupingSpecification.\[group\](sortSpec)}} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15716678#comment-15716678 ] Judith Silverman edited comment on SOLR-6203 at 12/3/16 12:09 AM: -- Hi, yes, that does indeed make sense, not that I have a clear idea of what "weighting of sort" does. And on that topic: I've had more time this week to work on this jira than I will have in the foreseeable future, so I'm forging ahead rather than sensibly waiting for your comments. I started calling new utility functions that make use of SortSpec's SchemaFields, but my updated unit tests kept failing with the same old "java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef" error, and I got to wondering about the call to schema.getFileOrNull() in the new implWeightSortSpec() function from the SOLR-9660 patch. That function allows the dynamic '*' field to lay claim to schema fields which SortSpecParsing carefully protected from it, just as it does when called by the XXXResultTransformer functions we are gearing up to modify. I have only the vaguest understanding of what the weightSort()/rewrite()/createWeight() functions are all about. Do they actually affect which SchemaField a SortField should be associated to? I tweaked implWeightSortSpec() to leave SchemaFields alone except in the case that nullEquivalent kicks in, and all unit tests (including new ones testing the use of the new utility functions) now pass. For now, I'm posting a patch to our branch containing just the tweak to implWSS() and a little cleanup (removing my questions and your replies). Have a good weekend yourself! Thanks, Judith was (Author: judith): Hi, yes, that does indeed make sense, not that I have a clear idea of what "weighting of sort" does. And on that topic: I've had more time this week to work on this jira than I will have in the foreseeable future, so I'm forging ahead rather than sensibly waiting for your comments. I started calling new utility functions that make use of SortSpec's SchemaFields, but my updated unit tests kept failing with the same old "java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef" error, and I got to wondering about the call to schema.getFileOrNull() in the new implWeightSortSpec() function from the SOLR-9660 patch. It seems to me to be allowing the dynamic '*' field to lay claim to schema fields which SortSpecParsing carefully protected from it. I have only the vaguest understanding of what weightSort()/rewrite()/ createWeight() functions are all about. Do they actually affect which SchemaField a SortField should be associated to? I tweaked implWeightSortSpec() to leave SchemaFields alone except in the case that nullEquivalent kicks in, and all tests now pass. I'll post a patch to our branch containing just that change and a little cleanup (removing my questions and your replies). Have a good weekend yourself! Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source e
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch Hi, yes, that does indeed make sense, not that I have a clear idea of what "weighting of sort" does. And on that topic: I've had more time this week to work on this jira than I will have in the foreseeable future, so I'm forging ahead rather than sensibly waiting for your comments. I started calling new utility functions that make use of SortSpec's SchemaFields, but my updated unit tests kept failing with the same old "java.lang.Double cannot be cast to org.apache.lucene.util.BytesRef" error, and I got to wondering about the call to schema.getFileOrNull() in the new implWeightSortSpec() function from the SOLR-9660 patch. It seems to me to be allowing the dynamic '*' field to lay claim to schema fields which SortSpecParsing carefully protected from it. I have only the vaguest understanding of what weightSort()/rewrite()/ createWeight() functions are all about. Do they actually affect which SchemaField a SortField should be associated to? I tweaked implWeightSortSpec() to leave SchemaFields alone except in the case that nullEquivalent kicks in, and all tests now pass. I'll post a patch to our branch containing just that change and a little cleanup (removing my questions and your replies). Have a good weekend yourself! Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15715697#comment-15715697 ] Judith Silverman commented on SOLR-6203: Hi, Christine, thanks for updating the branch and replying to my questions. Re the one about rb.getSortSpec() in SearchGroupShardResponseProcessor.java: it's already confusing to this newbie that the master code base has two Sorts (rb.getSortSpec().getSort() and rb.getGroupingSpec().getGroupSort()) in play at the same time in a grouped search (to say nothing of the within-group Sort), and by the time we're finished with this branch we will have not only two Sorts but two full-fledged SortSpecs. If we can do something at this early stage to make it clear which is to be used for what, or to consolidate them, I'm in favor. Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15710884#comment-15710884 ] Judith Silverman edited comment on SOLR-6203 at 12/1/16 5:30 AM: - Hi, in tonight's patch I finished uncommenting your new signatures and made the changes necessary to get the code to compile and the existing tests to pass. was (Author: judith): Hi, in tonight's patch I uncommented the last of your new signatures and made the changes necessary to get the code to compile and the existing tests to pass. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch, > SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch Hi, in tonight's patch I uncommented the last of your new signatures and made the changes necessary to get the code to compile and the existing tests to pass. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Comment Edited] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709543#comment-15709543 ] Judith Silverman edited comment on SOLR-6203 at 12/1/16 12:33 AM: -- Thanks for the update, Christine. I am happy to pursue your incremental approach. I have made a patch to your branch in which I uncommented a couple of your signature changes and modified calls to the affected methods to use the new signatures. I also took this opportunity to start standardizing field and method names related to the field variously known throughout the codebase as "sortWithinGroup" and "withinGroupSort". The latter fits better with related field and method names, and since we are already deprecating GroupingSpecification's accessors for Sorts in favor of accessors of SortSpecs, this seems to me like a good time to make the change. I renamed the new public accessors and also renamed private fields in all the files I was already modifying for this commit. If you approve of this change, I will rename private fields in other files. In the meantime, I will keep going in the direction you indicated. Thanks, Judith was (Author: judith): Thanks for the update, Christine. I am happy to pursue your incremental approach. I have made a patch to your branch in which I uncommented your signature changes and modified calls to the affected methods to use the new signatures. I also took this opportunity to start standardizing field and method names related to the field variously known throughout the codebase as "sortWithinGroup" and "withinGroupSort". The latter fits better with related field and method names, and since we are already deprecating GroupingSpecification's accessors for Sorts in favor of accessors of SortSpecs, this seems to me like a good time to make the change. I renamed the new public accessors and also renamed private fields in all the files I was already modifying for this commit. If you approve of this change, I will rename private fields in other files. In the meantime, I will start fleshing out utility functions as you indicated. Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.se
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709543#comment-15709543 ] Judith Silverman commented on SOLR-6203: Thanks for the update, Christine. I am happy to pursue your incremental approach. I have made a patch to your branch in which I uncommented your signature changes and modified calls to the affected methods to use the new signatures. I also took this opportunity to start standardizing field and method names related to the field variously known throughout the codebase as "sortWithinGroup" and "withinGroupSort". The latter fits better with related field and method names, and since we are already deprecating GroupingSpecification's accessors for Sorts in favor of accessors of SortSpecs, this seems to me like a good time to make the change. I renamed the new public accessors and also renamed private fields in all the files I was already modifying for this commit. If you approve of this change, I will rename private fields in other files. In the meantime, I will start fleshing out utility functions as you indicated. Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Issue Comment Deleted] (SOLR-9783) remove no-longer-needed sortWithinGroup null checks in (Search|Top)Group[s]ShardResponseProcessor
[ https://issues.apache.org/jira/browse/SOLR-9783?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-9783: --- Comment: was deleted (was: Hello, is there any context in which we *don't* want to interpret a null Sort value in a SortSpec as Sort.RELEVANCE? I ask because I just had a test fail because sortWithinGroup was null. (My code is highly experimental, so this failure doesn't prove anything about the master.) My investigation led me to SortSpecParsing's newEmptySortSpec(), which feeds a null Sort value to a SortSpec constructor. I'm wondering whether newEmptySortSpec() could send Sort.RELEVANCE instead and/or the SortSpec constructors could be modified to replace nulls with Sort.RELEVANCE (and to adjust whatever else would need adjusting). Apologies if this idea is impractical or has already been considered and dismissed.) > remove no-longer-needed sortWithinGroup null checks in > (Search|Top)Group[s]ShardResponseProcessor > - > > Key: SOLR-9783 > URL: https://issues.apache.org/jira/browse/SOLR-9783 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9783.patch > > > Why this, why now? I was looking some more at SOLR-6203 and what the next > sub-step after the SOLR-9660 sub-step might be. Revisiting [~Judith]'s > SOLR-6203 README file, the step (1) is included in SOLR-9660 and step (2) > mentions passing around SortSpecs rather than plain Sorts, with Search and > TopGroups ShardResponseProcessor amongst the files affected. In principle the > change for those two files should be straightforward i.e. > {code} > ... > - Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > + SortSpec sortSpecWithinGroup = > rb.getGroupingSpec().getSortSpecWithinGroup(); > ... > {code} > except that both starting points are > {code} > Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > if (sortWithinGroup == null) { // TODO prevent it from being null in the > first place > sortWithinGroup = Sort.RELEVANCE; > } > {code} > and so this ticket here aims to get rid of the two 'TODO' statements. The > statements were added as part of LUCENE-6900's > https://svn.apache.org/viewvc?view=revision&revision=1716569 in November 2015 > and Judith's original SOLR-6203.patch is from October 2015 i.e. slightly > before then. > [~dsmiley] - do you recall anything re: when/how {{sortWithinGroup}} could be > null back then? From my reading of the current (master) code the > sortWithinGroup would never be null now. {{solr/core}} tests pass when the if > statements are removed (will attach patch and also run the non-core solr > tests) but that could of course just be due to lacking test coverage. > And unrelated but noticed whilst in the code area, the patch includes a > {code} > + ... || sort == Sort.RELEVANCE) { > - ... || sort.equals(Sort.RELEVANCE)) { > {code} > tweak to QueryCommand.java also. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9783) remove no-longer-needed sortWithinGroup null checks in (Search|Top)Group[s]ShardResponseProcessor
[ https://issues.apache.org/jira/browse/SOLR-9783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706433#comment-15706433 ] Judith Silverman commented on SOLR-9783: Hello, is there any context in which we *don't* want to interpret a null Sort value in a SortSpec as Sort.RELEVANCE? I ask because I just had a test fail because sortWithinGroup was null. (My code is highly experimental, so this failure doesn't prove anything about the master.) My investigation led me to SortSpecParsing's newEmptySortSpec(), which feeds a null Sort value to a SortSpec constructor. I'm wondering whether newEmptySortSpec() could send Sort.RELEVANCE instead and/or the SortSpec constructors could be modified to replace nulls with Sort.RELEVANCE (and to adjust whatever else would need adjusting). Apologies if this idea is impractical or has already been considered and dismissed. > remove no-longer-needed sortWithinGroup null checks in > (Search|Top)Group[s]ShardResponseProcessor > - > > Key: SOLR-9783 > URL: https://issues.apache.org/jira/browse/SOLR-9783 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9783.patch > > > Why this, why now? I was looking some more at SOLR-6203 and what the next > sub-step after the SOLR-9660 sub-step might be. Revisiting [~Judith]'s > SOLR-6203 README file, the step (1) is included in SOLR-9660 and step (2) > mentions passing around SortSpecs rather than plain Sorts, with Search and > TopGroups ShardResponseProcessor amongst the files affected. In principle the > change for those two files should be straightforward i.e. > {code} > ... > - Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > + SortSpec sortSpecWithinGroup = > rb.getGroupingSpec().getSortSpecWithinGroup(); > ... > {code} > except that both starting points are > {code} > Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > if (sortWithinGroup == null) { // TODO prevent it from being null in the > first place > sortWithinGroup = Sort.RELEVANCE; > } > {code} > and so this ticket here aims to get rid of the two 'TODO' statements. The > statements were added as part of LUCENE-6900's > https://svn.apache.org/viewvc?view=revision&revision=1716569 in November 2015 > and Judith's original SOLR-6203.patch is from October 2015 i.e. slightly > before then. > [~dsmiley] - do you recall anything re: when/how {{sortWithinGroup}} could be > null back then? From my reading of the current (master) code the > sortWithinGroup would never be null now. {{solr/core}} tests pass when the if > statements are removed (will attach patch and also run the non-core solr > tests) but that could of course just be due to lacking test coverage. > And unrelated but noticed whilst in the code area, the patch includes a > {code} > + ... || sort == Sort.RELEVANCE) { > - ... || sort.equals(Sort.RELEVANCE)) { > {code} > tweak to QueryCommand.java also. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9783) remove no-longer-needed sortWithinGroup null checks in (Search|Top)Group[s]ShardResponseProcessor
[ https://issues.apache.org/jira/browse/SOLR-9783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15706221#comment-15706221 ] Judith Silverman commented on SOLR-9783: Hello, is there any context in which we *don't* want to interpret a null Sort value in a SortSpec as Sort.RELEVANCE? I ask because I just had a test fail because sortWithinGroup was null. (My code is highly experimental, so this failure doesn't prove anything about the master.) My investigation led me to SortSpecParsing's newEmptySortSpec(), which feeds a null Sort value to a SortSpec constructor. I'm wondering whether newEmptySortSpec() could send Sort.RELEVANCE instead and/or the SortSpec constructors could be modified to replace nulls with Sort.RELEVANCE (and to adjust whatever else would need adjusting). Apologies if this idea is impractical or has already been considered and dismissed. > remove no-longer-needed sortWithinGroup null checks in > (Search|Top)Group[s]ShardResponseProcessor > - > > Key: SOLR-9783 > URL: https://issues.apache.org/jira/browse/SOLR-9783 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9783.patch > > > Why this, why now? I was looking some more at SOLR-6203 and what the next > sub-step after the SOLR-9660 sub-step might be. Revisiting [~Judith]'s > SOLR-6203 README file, the step (1) is included in SOLR-9660 and step (2) > mentions passing around SortSpecs rather than plain Sorts, with Search and > TopGroups ShardResponseProcessor amongst the files affected. In principle the > change for those two files should be straightforward i.e. > {code} > ... > - Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > + SortSpec sortSpecWithinGroup = > rb.getGroupingSpec().getSortSpecWithinGroup(); > ... > {code} > except that both starting points are > {code} > Sort sortWithinGroup = rb.getGroupingSpec().getSortWithinGroup(); > if (sortWithinGroup == null) { // TODO prevent it from being null in the > first place > sortWithinGroup = Sort.RELEVANCE; > } > {code} > and so this ticket here aims to get rid of the two 'TODO' statements. The > statements were added as part of LUCENE-6900's > https://svn.apache.org/viewvc?view=revision&revision=1716569 in November 2015 > and Judith's original SOLR-6203.patch is from October 2015 i.e. slightly > before then. > [~dsmiley] - do you recall anything re: when/how {{sortWithinGroup}} could be > null back then? From my reading of the current (master) code the > sortWithinGroup would never be null now. {{solr/core}} tests pass when the if > statements are removed (will attach patch and also run the non-core solr > tests) but that could of course just be due to lacking test coverage. > And unrelated but noticed whilst in the code area, the patch includes a > {code} > + ... || sort == Sort.RELEVANCE) { > - ... || sort.equals(Sort.RELEVANCE)) { > {code} > tweak to QueryCommand.java also. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9660) in GroupingSpecification factor [group](sort|offset|limit) into [group](sortSpec)
[ https://issues.apache.org/jira/browse/SOLR-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702673#comment-15702673 ] Judith Silverman commented on SOLR-9660: Hi, Christine. I finally have a chunk of time and would like to help out here, but I don't want to get in the way of your program. Is there something in particular you would like me to look into? BTW, not sure whether you saw my question in this thread about changes to groupOffset from 26Oct16; maybe it should be asked/addressed separately. Thanks, Judith > in GroupingSpecification factor [group](sort|offset|limit) into > [group](sortSpec) > - > > Key: SOLR-9660 > URL: https://issues.apache.org/jira/browse/SOLR-9660 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9660.patch, SOLR-9660.patch, SOLR-9660.patch > > > This is split out and adapted from and towards the SOLR-6203 changes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9660) in GroupingSpecification factor [group](sort|offset|limit) into [group](sortSpec)
[ https://issues.apache.org/jira/browse/SOLR-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15611603#comment-15611603 ] Judith Silverman commented on SOLR-9660: Christine, thanks for the detailed explanations. > On balance my preference in this scenario would be to not rewrite the old > constructors since the constructor initialising num and offset members based > on the initial values of those very members seems unusual? Indeed. We could instead define default values as consts and do this: public SortSpec(Sort sort, List fields) { this(sort, fields, DEFAULT_NUM, DEFAULT_OFFSET); } Re a 4-parameter weightSortSpec(): I didn't mean to get rid of the 2-parameter version but to rewrite it in terms of a 4-parameter one: public SortSpec weightSortSpec(SortSpec originalSortSpec, Sort nullEquivalent) { return weightSortSpec( originalSortSpec, nullEquivalent, sortSpec.getCount(), sortSpec.getOffset() ); } Thanks for the link to SOLR-9412; will check it out. Judith > in GroupingSpecification factor [group](sort|offset|limit) into > [group](sortSpec) > - > > Key: SOLR-9660 > URL: https://issues.apache.org/jira/browse/SOLR-9660 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9660.patch, SOLR-9660.patch > > > This is split out and adapted from and towards the SOLR-6203 changes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9660) in GroupingSpecification factor [group](sort|offset|limit) into [group](sortSpec)
[ https://issues.apache.org/jira/browse/SOLR-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15608688#comment-15608688 ] Judith Silverman commented on SOLR-9660: Ah, glad you found that bug. While I was looking for it, I noticed that in at least three different files (Grouping.java, TopGroupsShardRequestFactory.java, TopGroupsShardResponseProcessor.java), we set something related to groupOffset to 0 if group.format == simple or groupingSpec.isMain(). I certainly don't see the whole picture, but other things being equal I would think it cleaner and safer to do that check as far upstream and in as few places as possible. Is there any advantage to having so many '5's in the unit tests, by the way? Seems to me that two of them could get swapped and the test rig would never know. Thanks, Judith > in GroupingSpecification factor [group](sort|offset|limit) into > [group](sortSpec) > - > > Key: SOLR-9660 > URL: https://issues.apache.org/jira/browse/SOLR-9660 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9660.patch, SOLR-9660.patch > > > This is split out and adapted from and towards the SOLR-6203 changes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-9660) in GroupingSpecification factor [group](sort|offset|limit) into [group](sortSpec)
[ https://issues.apache.org/jira/browse/SOLR-9660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607455#comment-15607455 ] Judith Silverman commented on SOLR-9660: Christine, I have no suggestions about the failing test but here are a couple of questions. Is it necessary to deprecate the GroupingSpecification accessors like getGroupOffset(), rather than simply modifying the definitions as you did? They could still be useful as wrappers. Not that I feel strongly about it, but your answer could tell me something about Solr philosophy. On a related note: now that you have added new SortSpec constructors, could you rewrite the old ones in terms of the new ones using the initial values of num and offset as the last two arguments: public SortSpec(Sort sort, List fields) { this(sort, fields, num, offset ); } ? I missed that in my SOLR-6203 patch but it jumped out at me now. Similarly, the new weightSortSpec() function could be defined in terms of a 4-parameter version: weightSortSpec(SortSpec originalSortSpec, Sort nullEquivalent, int count, int offset) to make it more self-contained. Thanks, Judith > in GroupingSpecification factor [group](sort|offset|limit) into > [group](sortSpec) > - > > Key: SOLR-9660 > URL: https://issues.apache.org/jira/browse/SOLR-9660 > Project: Solr > Issue Type: Task > Security Level: Public(Default Security Level. Issues are Public) >Reporter: Christine Poerschke >Assignee: Christine Poerschke >Priority: Minor > Attachments: SOLR-9660.patch > > > This is split out and adapted from and towards the SOLR-6203 changes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15607409#comment-15607409 ] Judith Silverman commented on SOLR-6203: Christine, thanks for taking an interest in SOLR-6203. I will be happy to lend a pair of eyes but it will take a while for me to remind myself how the patch worked and to catch up with the changes to Solr since 4.10. I do have some elementary questions about the patch for SOLR-9660 which I will post under that jira. Thanks again. > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nate Dire >Assignee: Christine Poerschke > Attachments: README, SOLR-6203-unittest.patch, > SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941441#comment-14941441 ] Judith Silverman commented on SOLR-6203: Hello, all. I have created a patch based on Hoss Man's advice. I added some unit tests and tested in my company's dev environment but have not tested with live traffic. I will upload the patch along with a README file summarizing the changes. This is my first patch; apologies in advance if I am doing something wrong, but please let me know! Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: README, SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Issue Comment Deleted] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Comment: was deleted (was: Hello, all. I have created a patch based on Hoss Man's advice. I added some unit tests and tested in my company's dev environment but have not tested with live traffic. I will upload the patch along with a README file summarizing the changes. This is my first patch; apologies in advance if I am doing something wrong, but please let me know! Thanks, Judith ) > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: README, SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941432#comment-14941432 ] Judith Silverman commented on SOLR-6203: Hello, all. I have created a patch based on Hoss Man's advice. I added some unit tests and tested in my company's dev environment but have not tested with live traffic. I will upload the patch along with a README file summarizing the changes. This is my first patch; apologies in advance if I am doing something wrong, but please let me know! Thanks, Judith > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: README, SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Attachment: SOLR-6203.patch README > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: README, SOLR-6203-unittest.patch, SOLR-6203.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Issue Comment Deleted] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Judith Silverman updated SOLR-6203: --- Comment: was deleted (was: Hello, has anybody looked into this? I have tried to take Hoss Man's advice, but my tests are still failing. This is my first dive into Solr code and I am only guessing how things fit together. I don't think it's worth posting my code, but here is the list of source files I have stumbled across and modified; if some other files are calling out for modification, please let me know! Thanks in advance for any suggestions. ./solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java ./solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/ShardResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java ./solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java ./solr/core/src/java/org/apache/solr/search/QParser.java) > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (SOLR-6203) cast exception while searching with sort function and result grouping
[ https://issues.apache.org/jira/browse/SOLR-6203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14493256#comment-14493256 ] Judith Silverman commented on SOLR-6203: Hello, has anybody looked into this? I have tried to take Hoss Man's advice, but my tests are still failing. This is my first dive into Solr code and I am only guessing how things fit together. I don't think it's worth posting my code, but here is the list of source files I have stumbled across and modified; if some other files are calling out for modification, please let me know! Thanks in advance for any suggestions. ./solr/core/src/java/org/apache/solr/handler/component/ResponseBuilder.java ./solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/command/SearchGroupsFieldCommand.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/SearchGroupsResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/ShardResultTransformer.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/SearchGroupShardResponseProcessor.java ./solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java ./solr/core/src/java/org/apache/solr/search/grouping/GroupingSpecification.java ./solr/core/src/java/org/apache/solr/search/QParser.java > cast exception while searching with sort function and result grouping > - > > Key: SOLR-6203 > URL: https://issues.apache.org/jira/browse/SOLR-6203 > Project: Solr > Issue Type: Bug > Components: search >Affects Versions: 4.7, 4.8 >Reporter: Nathan Dire > Attachments: SOLR-6203-unittest.patch > > > After upgrading from 4.5.1 to 4.7+, a schema including a {{"*"}} dynamic > field as text gets a cast exception when using a sort function and result > grouping. > Repro (with example config): > # Add {{"*"}} dynamic field as a {{TextField}}, eg: > {noformat} > > {noformat} > # Create sharded collection > {noformat} > curl > 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test&numShards=2&maxShardsPerNode=2' > {noformat} > # Add example docs (query must have some results) > # Submit query which sorts on a function result and uses result grouping: > {noformat} > { > "responseHeader": { > "status": 500, > "QTime": 50, > "params": { > "sort": "sqrt(popularity) desc", > "indent": "true", > "q": "*:*", > "_": "1403709010008", > "group.field": "manu", > "group": "true", > "wt": "json" > } > }, > "error": { > "msg": "java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef", > "code": 500 > } > } > {noformat} > Source exception from log: > {noformat} > ERROR - 2014-06-25 08:10:10.055; org.apache.solr.common.SolrException; > java.lang.ClassCastException: java.lang.Double cannot be cast to > org.apache.lucene.util.BytesRef > at > org.apache.solr.schema.FieldType.marshalStringSortValue(FieldType.java:981) > at org.apache.solr.schema.TextField.marshalSortValue(TextField.java:176) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.serializeSearchGroup(SearchGroupsResultTransformer.java:125) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:65) > at > org.apache.solr.search.grouping.distributed.shardresultserializer.SearchGroupsResultTransformer.transform(SearchGroupsResultTransformer.java:43) > at > org.apache.solr.search.grouping.CommandHandler.processResult(CommandHandler.java:193) > at > org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:340) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:218) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > ... > {noformat} > It looks like {{serializeSearchGroup}} is matching the sort expression as the > {{"*"}} dynamic field, which is a TextField in the repro. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org