You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vidhya Kailash <vi...@gmail.com> on 2018/11/07 18:22:11 UTC

Unable to get Solr Graph Traversal working

I am unable to get even simple graph traversal expressions like the one
below to work in my environment (7.4 and 7.5 versions). They simply yield
no results, even though I know the data exists.
curl --data-urlencode 'expr=gatherNodes(rec_coll,

walk="35d40c4b9d6ddfsdf45cbb0fe4aesd75->USER_ID",
                                        gather="ITEM_ID")'
http://localhost:8983/solr/rec_coll/graph

Can someone help?

thanks
Vidhya

Re: Unable to get Solr Graph Traversal working

Posted by Vidhya Kailash <vi...@gmail.com>.
thanks Joel. Running with /stream handler did reveal some issues and after
fixing the same the gagtherNodes expr is working!! I am trying out the
recommendations sample from solr website for my use case and now I am
struck at the next step which is unable to get the top 3 of those nodes:
curl --data-urlencode 'expr=top(n="30",
                    sort="count(*) desc",
                    nodes(rec_coll,
                                search(rec_coll,
q="35d40c4b9d6ddfsdf45cbb0fe4aesd75->USER_ID",  fl="ITEM_ID",
sort="ITEM_ID desc", qt="/export"),
                                walk="ITEM_ID->ITEM_ID",
                                gather="USER_ID", fl="USER_ID",
                                maxDocFreq="10000",
                                count(*)))'
http://localhost:8983/solr/rec_coll/graph


Again appreciate any help....

Vidhya


On Thu, Nov 8, 2018 at 1:23 PM Joel Bernstein <jo...@gmail.com> wrote:

> The basic syntax looks ok. Try it first on the /stream handler to rule out
> any issues that might be related to /graph handler. Can you provide the
> logs from one of the shards in the rec_coll collection that are generated
> by this request? The logs will show the query that is actually being run on
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
>
> On Wed, Nov 7, 2018 at 1:22 PM Vidhya Kailash <vi...@gmail.com>
> wrote:
>
> > I am unable to get even simple graph traversal expressions like the one
> > below to work in my environment (7.4 and 7.5 versions). They simply yield
> > no results, even though I know the data exists.
> > curl --data-urlencode 'expr=gatherNodes(rec_coll,
> >
> > walk="35d40c4b9d6ddfsdf45cbb0fe4aesd75->USER_ID",
> >                                         gather="ITEM_ID")'
> > http://localhost:8983/solr/rec_coll/graph
> >
> > Can someone help?
> >
> > thanks
> > Vidhya
> >
>


-- 
Vidhya Kailash

Re: Unable to get Solr Graph Traversal working

Posted by Joel Bernstein <jo...@gmail.com>.
The basic syntax looks ok. Try it first on the /stream handler to rule out
any issues that might be related to /graph handler. Can you provide the
logs from one of the shards in the rec_coll collection that are generated
by this request? The logs will show the query that is actually being run on

Joel Bernstein
http://joelsolr.blogspot.com/


On Wed, Nov 7, 2018 at 1:22 PM Vidhya Kailash <vi...@gmail.com>
wrote:

> I am unable to get even simple graph traversal expressions like the one
> below to work in my environment (7.4 and 7.5 versions). They simply yield
> no results, even though I know the data exists.
> curl --data-urlencode 'expr=gatherNodes(rec_coll,
>
> walk="35d40c4b9d6ddfsdf45cbb0fe4aesd75->USER_ID",
>                                         gather="ITEM_ID")'
> http://localhost:8983/solr/rec_coll/graph
>
> Can someone help?
>
> thanks
> Vidhya
>