[jira] [Commented] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17189079#comment-17189079 ] Thomas Schmiereck commented on SOLR-14782: -- For me it would be logical if the field type defined in "{color:#067d17}queryFieldType{color}" provided a function for the unescape which is then used automatically from the "QueryElevationComponent". But I am not sure whether the field-type is related to the query parser that is used. > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17188341#comment-17188341 ] Thomas Schmiereck commented on SOLR-14782: -- [~broustant] I use: <{color:#0033b3}searchComponent {color}{color:#174ad4}name{color}{color:#067d17}="elevator" {color}{color:#174ad4}class{color}{color:#067d17}="solr.QueryElevationComponent" {color}> <{color:#0033b3}str {color}{color:#174ad4}name{color}{color:#067d17}="queryFieldType"{color}>lowercase <{color:#0033b3}str {color}{color:#174ad4}name{color}{color:#067d17}="forceElevation"{color}>true <{color:#0033b3}str {color}{color:#174ad4}name{color}{color:#067d17}="config-file"{color}>elevate.xml with: > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17187579#comment-17187579 ] Thomas Schmiereck commented on SOLR-14782: -- [~broustant] Sorry, was the wrong file. Now it is the right one. > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Updated] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14782: - Attachment: SOLR-14782.patch > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Updated] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14782: - Attachment: (was: SOLR-14782.patch) > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17187555#comment-17187555 ] Thomas Schmiereck commented on SOLR-14782: -- Hi [~broustant], I've added my patch for this. > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Updated] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14782: - Attachment: SOLR-14782.patch > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > Attachments: SOLR-14782.patch > > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Updated] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14782: - Description: h1. Description if the elevate.xml contains a entry with spaces: <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa bbb"{color}><{color:#0033b3}doc {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" {color}/> and the Solr query term is escaped: {{?q=aaa+bbb}} the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml. Result is that the entry is not elevated. A also valid (not escaped) query like: {{?q=aaa%20bbb}} is working. h1. Technical Notes see: org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery was: h1. Description if the elevate.xml contains a entry with spaces: <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa bbb"{color}><{color:#0033b3}doc {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" {color}/> and the Solr query term is escaped: {{?q=aaa\\+bbb}} the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml. Result is that the entry is not elevated. A also valid (not escaped) query like: {{?q=aaa%20bbb}} is working. h1. Technical Notes see: org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Updated] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
[ https://issues.apache.org/jira/browse/SOLR-14782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14782: - Description: h1. Description if the elevate.xml contains a entry with spaces: <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa bbb"{color}><{color:#0033b3}doc {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" {color}/> and the Solr query term is escaped: {{?q=aaa\\+bbb}} the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml. Result is that the entry is not elevated. A also valid (not escaped) query like: {{?q=aaa%20bbb}} is working. h1. Technical Notes see: org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery was: h1. Description if the elevate.xml contains a entry with spaces: <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa bbb"{color}><{color:#0033b3}doc {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" {color}/> and the Solr query term is escaped: {{?q=aaa\+bbb}} the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml. Result is that the entry is not elevated. A also valid (not escaped) query like: {{?q=aaa%20bbb}} is working. h1. Technical Notes see: org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > QueryElevationComponent does not handle escaped query terms > --- > > Key: SOLR-14782 > URL: https://issues.apache.org/jira/browse/SOLR-14782 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers >Affects Versions: 8.2 >Reporter: Thomas Schmiereck >Assignee: Bruno Roustant >Priority: Major > Labels: elevation > > h1. Description > if the elevate.xml contains a entry with spaces: > <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa > bbb"{color}><{color:#0033b3}doc > {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" > {color}/> > and the Solr query term is escaped: > {{?q=aaa\\+bbb}} > the Solr search itself handels this correctly, but the elevate component > "QueryElevationComponent" does not unescape the query term bevor the lookup > in the elevate.xml. > Result is that the entry is not elevated. > A also valid (not escaped) query like: > {{?q=aaa%20bbb}} > is working. > h1. Technical Notes > see: > org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery > -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Created] (SOLR-14782) QueryElevationComponent does not handle escaped query terms
Thomas Schmiereck created SOLR-14782: Summary: QueryElevationComponent does not handle escaped query terms Key: SOLR-14782 URL: https://issues.apache.org/jira/browse/SOLR-14782 Project: Solr Issue Type: Bug Security Level: Public (Default Security Level. Issues are Public) Components: query parsers Affects Versions: 8.2 Reporter: Thomas Schmiereck h1. Description if the elevate.xml contains a entry with spaces: <{color:#0033b3}query {color}{color:#174ad4}text{color}{color:#067d17}="aaa bbb"{color}><{color:#0033b3}doc {color}{color:#174ad4}id{color}{color:#067d17}="core2docId2" {color}/> and the Solr query term is escaped: {{?q=aaa\+bbb}} the Solr search itself handels this correctly, but the elevate component "QueryElevationComponent" does not unescape the query term bevor the lookup in the elevate.xml. Result is that the entry is not elevated. A also valid (not escaped) query like: {{?q=aaa%20bbb}} is working. h1. Technical Notes see: org.apache.solr.handler.component.QueryElevationComponent.MapElevationProvider#getElevationForQuery -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org
[jira] [Commented] (SOLR-14662) Elevation with distributed search causes NPE
[ https://issues.apache.org/jira/browse/SOLR-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17179636#comment-17179636 ] Thomas Schmiereck commented on SOLR-14662: -- [~erickerickson] Thanks for the hint. I will keep that in mind in the future. A hint from me, the Bug also appears in 8.6 and I've tested the Fix also successfully in 8.6. > Elevation with distributed search causes NPE > > > Key: SOLR-14662 > URL: https://issues.apache.org/jira/browse/SOLR-14662 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 8.2 >Reporter: Marc Linden >Priority: Major > Labels: distributed_search, elevation > Attachments: > SOLR-14662-Elevation-with-distributed-search-causes-.patch > > > When performing a distributed search with multiple shards having elevation > configured where one ore more shards do have elevated results but others do > not a NullPointerException is thrown. > We are using Solr 8.2 and have the QueryElevationComponent configured with > "last-components" of the default search handler "/select". But the problem > also occurs when using the explicit "/elevate" search handler. > {code:xml} > > ... > > elevator > > > ... > > > string > elevate.xml > > {code} > h3. Steps to reproduce: > (1) Add entries to the elevate.xml of each core to elevate a specific > document for the text "elevatedTerm > {code:xml} > core1: > > ... > > > core2: > > ... > > > {code} > (2) Execute query (we use port 9983) > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0 > {noformat} > As both shards have elevated documents for the requested "elevatedTerm" the > search results are as expected: > {noformat} > response: { > numFound: 5192, > start: 0, > maxScore: 1.9032197, > docs: [{ > area: "press", > id: "core1docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core1" > }, { > area: "products", > id: "core2docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core2" > }, { > area: "press", > id: "core1docId2", > [elevated]: false, > [shard]: "localhost:9983/solr/core1" > }, > ... > {noformat} > (3) Remove the elevation entry for that "elevatedTerm" from one of the > cores, e.g. via comment > {code:xml} > core2: > > ... > > > {code} > (4) Reload the modified core: > [http://localhost:9983/solr/admin/cores?action=RELOAD=core2] > (5) Request same query again and you get the NPE: > {noformat} > error: { > trace: "java.lang.NullPointerException > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1068) > at > org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:917) > at > org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613) > at > org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2578) > at > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:780) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:566) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:423) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:350) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) > ... > {noformat} > When adding the {{sort}} parameter with {{forceElevation=true}} to the query > then a ClassCastException is thrown > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0=area%20asc=true{noformat} > {noformat} > java.lang.ClassCastException: java.lang.Integer cannot be cast to > java.lang.String > at > org.apache.solr.schema.FieldType.unmarshalStringSortValue(FieldType.java:1229) > at org.apache.solr.schema.StrField.unmarshalSortValue(StrField.java:122) > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1092) > at
[jira] [Updated] (SOLR-14662) Elevation with distributed search causes NPE
[ https://issues.apache.org/jira/browse/SOLR-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Schmiereck updated SOLR-14662: - Attachment: SOLR-14662-Elevation-with-distributed-search-causes-.patch > Elevation with distributed search causes NPE > > > Key: SOLR-14662 > URL: https://issues.apache.org/jira/browse/SOLR-14662 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 8.2 >Reporter: Marc Linden >Priority: Major > Labels: distributed_search, elevation > Attachments: > SOLR-14662-Elevation-with-distributed-search-causes-.patch > > > When performing a distributed search with multiple shards having elevation > configured where one ore more shards do have elevated results but others do > not a NullPointerException is thrown. > We are using Solr 8.2 and have the QueryElevationComponent configured with > "last-components" of the default search handler "/select". But the problem > also occurs when using the explicit "/elevate" search handler. > {code:xml} > > ... > > elevator > > > ... > > > string > elevate.xml > > {code} > h3. Steps to reproduce: > (1) Add entries to the elevate.xml of each core to elevate a specific > document for the text "elevatedTerm > {code:xml} > core1: > > ... > > > core2: > > ... > > > {code} > (2) Execute query (we use port 9983) > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0 > {noformat} > As both shards have elevated documents for the requested "elevatedTerm" the > search results are as expected: > {noformat} > response: { > numFound: 5192, > start: 0, > maxScore: 1.9032197, > docs: [{ > area: "press", > id: "core1docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core1" > }, { > area: "products", > id: "core2docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core2" > }, { > area: "press", > id: "core1docId2", > [elevated]: false, > [shard]: "localhost:9983/solr/core1" > }, > ... > {noformat} > (3) Remove the elevation entry for that "elevatedTerm" from one of the > cores, e.g. via comment > {code:xml} > core2: > > ... > > > {code} > (4) Reload the modified core: > [http://localhost:9983/solr/admin/cores?action=RELOAD=core2] > (5) Request same query again and you get the NPE: > {noformat} > error: { > trace: "java.lang.NullPointerException > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1068) > at > org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:917) > at > org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613) > at > org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2578) > at > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:780) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:566) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:423) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:350) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) > ... > {noformat} > When adding the {{sort}} parameter with {{forceElevation=true}} to the query > then a ClassCastException is thrown > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0=area%20asc=true{noformat} > {noformat} > java.lang.ClassCastException: java.lang.Integer cannot be cast to > java.lang.String > at > org.apache.solr.schema.FieldType.unmarshalStringSortValue(FieldType.java:1229) > at org.apache.solr.schema.StrField.unmarshalSortValue(StrField.java:122) > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1092) > at > org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:917) > at >
[jira] [Commented] (SOLR-14662) Elevation with distributed search causes NPE
[ https://issues.apache.org/jira/browse/SOLR-14662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17177728#comment-17177728 ] Thomas Schmiereck commented on SOLR-14662: -- I simulated that on my local system and found out that the NPE only appers if I remove the elevation entry for that "elevatedTerm" from the "core1" (which I created first). > Elevation with distributed search causes NPE > > > Key: SOLR-14662 > URL: https://issues.apache.org/jira/browse/SOLR-14662 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 8.2 >Reporter: Marc Linden >Priority: Major > Labels: distributed_search, elevation > > When performing a distributed search with multiple shards having elevation > configured where one ore more shards do have elevated results but others do > not a NullPointerException is thrown. > We are using Solr 8.2 and have the QueryElevationComponent configured with > "last-components" of the default search handler "/select". But the problem > also occurs when using the explicit "/elevate" search handler. > {code:xml} > > ... > > elevator > > > ... > > > string > elevate.xml > > {code} > h3. Steps to reproduce: > (1) Add entries to the elevate.xml of each core to elevate a specific > document for the text "elevatedTerm > {code:xml} > core1: > > ... > > > core2: > > ... > > > {code} > (2) Execute query (we use port 9983) > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0 > {noformat} > As both shards have elevated documents for the requested "elevatedTerm" the > search results are as expected: > {noformat} > response: { > numFound: 5192, > start: 0, > maxScore: 1.9032197, > docs: [{ > area: "press", > id: "core1docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core1" > }, { > area: "products", > id: "core2docId1", > [elevated]: true, > [shard]: "localhost:9983/solr/core2" > }, { > area: "press", > id: "core1docId2", > [elevated]: false, > [shard]: "localhost:9983/solr/core1" > }, > ... > {noformat} > (3) Remove the elevation entry for that "elevatedTerm" from one of the > cores, e.g. via comment > {code:xml} > core2: > > ... > > > {code} > (4) Reload the modified core: > [http://localhost:9983/solr/admin/cores?action=RELOAD=core2] > (5) Request same query again and you get the NPE: > {noformat} > error: { > trace: "java.lang.NullPointerException > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1068) > at > org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:917) > at > org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:613) > at > org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:592) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:431) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2578) > at > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:780) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:566) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:423) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:350) > at > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540) > ... > {noformat} > When adding the {{sort}} parameter with {{forceElevation=true}} to the query > then a ClassCastException is thrown > {noformat} > http://localhost:9983/solr/core1/select?q=elevatedTerm=false=text_en=edismax=lang:en=localhost:9983/solr/core1,localhost:9983/solr/core2=[elevated],[shard],area,id=10=0=area%20asc=true{noformat} > {noformat} > java.lang.ClassCastException: java.lang.Integer cannot be cast to > java.lang.String > at > org.apache.solr.schema.FieldType.unmarshalStringSortValue(FieldType.java:1229) > at org.apache.solr.schema.StrField.unmarshalSortValue(StrField.java:122) > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1092) > at >