Joel,
  Should I create a JIRA for making shortestPath return stream of tuples?

On Sun, Jan 14, 2018 at 11:52 PM, Karthik Ramachandran <mrk...@gmail.com>
wrote:

> Joel,
>   Thanks, I did try using cartesianProduct then fetch, it is working as
> excepted. For my dataset has only 5 or 6 level for that shortestPath
> response time is ~5 sec and with cartesianProduct and fetch I am getting
> ~6.5 sec.  Is there any other way to achieve this?
>
> For my use case graph query did work well but with SolrCloud, there is no
> guarantee that all the nodes will in the same shard.
>
> On Sun, Jan 14, 2018 at 8:20 PM, Joel Bernstein <joels...@gmail.com>
> wrote:
>
>> Actually I think you can achieve what you're looking for by using the
>> cartesianProduct expression around the shortest expression. The construct
>> would look like this:
>>
>> fetch(cartesianProduct(shortesPath()))
>>
>> The link below describes how the cartesianProduct expression works:
>> https://lucene.apache.org/solr/guide/7_2/stream-decorator-
>> reference.html#cartesianproduct
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>> On Sun, Jan 14, 2018 at 8:07 PM, Joel Bernstein <joels...@gmail.com>
>> wrote:
>>
>> > The shortestPath returns a list of node id's, and fetch expects a stream
>> > of tuples. So they are not compatible currently. It think makes sense to
>> > change shortestPath to return a stream of tuples so it can work with
>> fetch
>> > and other expressions.
>> >
>> > Are you getting good performance with the shortestPath expression?
>> >
>> > Joel Bernstein
>> > http://joelsolr.blogspot.com/
>> >
>> > On Sun, Jan 14, 2018 at 11:47 AM, Karthik Ramachandran <
>> mrk...@gmail.com>
>> > wrote:
>> >
>> >> Can shortestPath stream source be used with fetch?
>> >>
>> >> With below streaming expression, we only get the path, are we doing
>> >> something wrong here?
>> >>
>> >> fetch(collection,
>> >>       shortestPath(collection, from="10", to="1", edge="id=parentid",
>> >> maxDepth="10"),
>> >>       fl="id, name, other, details",
>> >>       sort="name asc"
>> >>       on="id=id")
>> >>
>> >> With Thanks & Regards
>> >> Karthik Ramachandran
>> >>
>> >> P Please don't print this e-mail unless you really need to
>> >>
>> >
>> >
>>
>
>
>
> --
> With Thanks & Regards
> Karthik Ramachandran
>
> P Please don't print this e-mail unless you really need to
>
>
>



-- 
With Thanks & Regards
Karthik Ramachandran

P Please don't print this e-mail unless you really need to

Reply via email to