Kenny Knecht created SOLR-15546: ----------------------------------- Summary: shortestPath intrenally cannot handle ids with colons Key: SOLR-15546 URL: https://issues.apache.org/jira/browse/SOLR-15546 Project: Solr Issue Type: Bug Security Level: Public (Default Security Level. Issues are Public) Components: streaming expressions Affects Versions: 8.8.2 Reporter: Kenny Knecht
I have the following simple expression {{expr=shortestPath(core_data,from="https\://mycompany.com/id/ARMP/AM/GT/ST/CCS1/01/03/05/96/96",to="https\://mycompany.com/id/ARMP/AM/GT/ST/CCS1/01/03/IS/02",edge="id=link_ss",maxDepth="4")}} And this gives an error. {{java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: java.util.concurrent.ExecutionException: java.io.IOException: --> http://172.22.0.28:8983/solr/core_data_shard2_replica_n2/:org.apache.solr.search.SyntaxError: Cannot parse 'id:([https://mycompany.com/id/STL/KG1/pk_67_4])': Encountered " "]" "] "" at line 1, column 49. Was expecting: "TO" ... at org.apache.solr.client.solrj.io.graph.ShortestPathStream.open(ShortestPathStream.java:366) at org.apache.solr.client.solrj.io.stream.ExceptionStream.open(ExceptionStream.java:52) at org.apache.solr.handler.StreamHandler$TimerStream.open(StreamHandler.java:465) at org.apache.solr.client.solrj.io.stream.TupleStream.writeMap(TupleStream.java:79) at org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:164) at org.apache.solr.common.util.TextWriter.writeMap(TextWriter.java:216) at org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:69) at org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:153) at org.apache.solr.common.util.JsonTextWriter.writeNamedListAsMapWithDups(JsonTextWriter.java:387) at org.apache.solr.common.util.JsonTextWriter.writeNamedList(JsonTextWriter.java:293) at org.apache.solr.response.JSONWriter.writeResponse(JSONWriter.java:73) at org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:66) at org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65) at org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:891) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:584) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:415) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)}} Let me explain further: the link fields I use are {{id}} (single valued) and {{link_ss}} (multivalued). Depending on the order I use ({{id=link_ss}} or {{link_ss=id}}) I get a different mistake. {{Cannot parse 'link_ss:(https://mycomany.com/id/STL/KG1/pk_67_8/TS_67_8_5152_4 https://mycomany.com/id/STL/KG1/pk_67_4/TS_67_4_260_3 https://mycomany.com/id/STL/KG1/pk_67_4/TS_67_4_260_9)}} or the one above. But notice how the parsing error already contains **different ids from the original one**. So the error really happens internally when crawling through the graph. The query from above indeed does not work, but putting double quotes around the id helps i.e. {{link_ss:("https://mycomany.com/id/STL/KG1/pk_67_8/TS_67_8_5152_4")}} does work -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org