Graph traversel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Graph traversel

mganeshs
Hi

I am trying graph traversal based on the documentation available over here

http://solr.pl/en/2016/04/18/solr-6-0-and-graph-traversal-support/

But the it's not working as expected.

For this query

http://localhost:8983/solr/graph/query?q=*:*&fq={!graph%20from=parent_id%20to=id}id:1

( which is to get all node getting traversed via node 1 )

I get the result as
"docs":[
      {
        "id":"1"},
      {
        "id":"11"},
      {
        "id":"12"},
      {
        "id":"13"},
      {
        "id":"122"}]

Where as I expect result as 1,11,12,13,121, 122, 131.

What's going wrong ?

Can any body help us on this ?

Is the graph traversal stable enough in SOLR 6.5 ?

Regards,
Ganesh













Reply | Threaded
Open this post in threaded view
|

Re: Graph traversel

mganeshs
I also tried with the sample data mentioned in this link.

https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-GraphQueryParser

even for that, after loading the data and for the query

http://localhost:8983/solr/graph/query?q={!graph%20from=in_edge%20to=out_edge}id:A&fl=id

I got the response as


{
  "responseHeader":{
    "zkConnected":true,
    "status":0,
    "QTime":7,
    "params":{
      "q":"{!graph from=in_edge to=out_edge}id:A",
      "fl":"id"}},
  "response":{"numFound":1,"start":0,"maxScore":1.0,"docs":[
      {
        "id":"A"}]
  }}

instead of

"response":{"numFound":6,"start":0,"docs":[
   { "id":"A" },
   { "id":"B" },
   { "id":"C" },
   { "id":"D" },
   { "id":"E" },
   { "id":"F" } ]
}




Is any settings to enable graph traversal has to be done ?

Kindly let me know

Regards,

On Fri, Apr 21, 2017 at 1:20 PM Ganesh M <[hidden email]<mailto:[hidden email]>> wrote:
Hi

I am trying graph traversal based on the documentation available over here

http://solr.pl/en/2016/04/18/solr-6-0-and-graph-traversal-support/

But the it's not working as expected.

For this query

http://localhost:8983/solr/graph/query?q=*:*&fq={!graph%20from=parent_id%20to=id}id:1<http://localhost:8983/solr/graph/query?q=*:*&fq=%7B!graph%20from=parent_id%20to=id%7Did:1>

( which is to get all node getting traversed via node 1 )

I get the result as
"docs":[
      {
        "id":"1"},
      {
        "id":"11"},
      {
        "id":"12"},
      {
        "id":"13"},
      {
        "id":"122"}]

Where as I expect result as 1,11,12,13,121, 122, 131.

What's going wrong ?

Can any body help us on this ?

Is the graph traversal stable enough in SOLR 6.5 ?

Regards,
Ganesh













Reply | Threaded
Open this post in threaded view
|

Re: Graph traversel

mganeshs
In reply to this post by mganeshs
Dear Solr experts,

Can you any one over here explain about why graph traversal is not working as expected in Solr 6.5 ?

It's not traversing all the child nodes. It traverse only few nodes and not getting all the mid level and leaf nodes.

As I explained below,

For this query

http://localhost:8983/solr/graph/query?q=*:*&fq={!graph%20from=parent_id%20to=id}id:1

( which is to get all node getting traversed via node 1 )

I get the result as
"docs":[
      {
        "id":"1"},
      {
        "id":"11"},
      {
        "id":"12"},
      {
        "id":"13"},
      {
        "id":"122"}]

Where as I expect result as 1,11,12,13,121, 122, 131.

What's going wrong ?

Following is the data I uploaded

[{
        "id": "1",
        "name": "Root document one"
},
{
        "id": "2",
        "name": "Root document two"
},
{
        "id": "3",
        "name": "Root document three"
},
{
        "id": "11",
        "parent_id": "1",
        "name": "First level document 1, child one"
},
{
        "id": "12",
        "parent_id": "1",
        "name": "First level document 1, child two"
},
{
        "id": "13",
        "parent_id": "1",
        "name": "First level document 1, child three"
},
{
        "id": "21",
        "parent_id": "2",
        "name": "First level document 2, child one"
},
{
        "id": "22",
        "parent_id": "2",
        "name": "First level document 2, child two"
},
{
        "id": "121",
        "parent_id": "12",
        "name": "Second level document 12, child one"
},
{
        "id": "122",
        "parent_id": "12",
        "name": "Second level document 12, child two"
},
{
        "id": "131",
        "parent_id": "13",
        "name": "Second level document 13, child three"
}]