Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15546

shortestPath internally cannot handle ids with colons

    XMLWordPrintableJSON

Details

    Description

      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 'idhttps://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_sshttps://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

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kennyKnecht Kenny Knecht
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m