我有以下简单表达式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")
这就产生了一个错误。
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)
让我进一步解释:我使用的链接字段是id
(单值(和link_ss
(多值(。根据我使用的顺序(id=link_ss
或link_ss=id
(,我会得到不同的错误。CCD_ 6或上面的一个。但请注意,解析错误已经包含了与原始ID不同的ID。因此,当在图中爬行时,错误确实会在内部发生。上面的查询确实不起作用,但在id周围加双引号有帮助,即link_ss:("https://mycomany.com/id/STL/KG1/pk_67_8/TS_67_8_5152_4")
确实起的作用
谢谢!
我做了一些实验,似乎你必须逃离"中的冒号(:(;从";字段,但不在";至";流式表达式的字段。只需在";从";领域例如:
shortestPath(oana,from="http://google.com",to="http://oana1.com",edge="link_from=link_to",maxDepth="1")