Re: Using multi valued field in solr cloud Graph Traversal Query

2018-03-16 Thread Jan Høydahl
> Adding multi-value field support is a fairly high priority so I would
> expect this to be coming in a future release.

I got this question from a client of mine as well. Trying to find a JIRA issue 
for multi value support, is there one?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 11. mar. 2017 kl. 03:21 skrev Joel Bernstein :
> 
> Currently gatherNodes only works on single value fields. You can seed a
> gatherNodes with a facet() expression which works with multi-value fields,
> but after that it only works with single value fields.
> 
> So you would have to index the data as a graph like this:
> 
> id, concept1, participant1
> id, concept1, participant2
> id, concept2, participant1
> id, concept2, participant3
> id, concept3, participant2
> 
> 
> Then you walk the graph like this:
> 
> gatherNodes(mydata,
>  gatheNodes(mydata, walk="concept1->conceptID",
> gather="participantID")
>  walk="node->particpantID",
>  gather="conceptID")
> 
> This is a two step graph expression:
> 1) Gathers all the participantID's where concept1 is in the conceptID
> field.
> 2) Gathers all the conceptID's for the participantID's gathered in step 1.
> 
> Let me know if you have other questions about how to structure the data or
> run the queries.
> 
> 
> 
> 
> 
> 
> 
> 
> Adding multi-value field support is a fairly high priority so I would
> expect this to be coming in a future release.
> 
> 
> 
> 
> Joel Bernstein
> http://joelsolr.blogspot.com/
> 
> On Fri, Mar 10, 2017 at 5:15 PM, Pratik Patel  wrote:
> 
>> I am trying to do a graph traversal query using gatherNode function. I am
>> seeding a streaming expression to get some documents and then I am trying
>> to map their ids(conceptid) to a multi valued field "participantIds" and
>> gather nodes.
>> 
>> Here is the query I am doing.
>> 
>> 
>> gatherNodes(collection1,
>>> search(collection1,q="*:*",fl="conceptid",sort="conceptid
>>> asc",fq=storeid:"524efcfd505637004b1f6f24",fq=tags:"Project"),
>>> walk=conceptid->participantIds,
>>> gather="conceptid")
>> 
>> 
>> The field participantIds is a multi valued field. This is the field which
>> holds connections between the documents. When I execute this query, I get
>> exception as below.
>> 
>> 
>> { "result-set": { "docs": [ { "EXCEPTION":
>> "java.util.concurrent.ExecutionException: java.lang.RuntimeException:
>> java.io.IOException: java.util.concurrent.ExecutionException:
>> java.io.IOException: -->
>> http://169.254.40.158:8081/solr/collection1_shard1_replica1/:can not sort
>> on multivalued field: participantIds", "EOF": true, "RESPONSE_TIME": 15 } ]
>> } }
>> 
>> 
>> Does this mean you can not look into multivalued fields in graph traversal
>> query? In our solr index, we have documents having "conceptid" field which
>> is id and we have participantIds which is a multivalued field storing
>> connections of that documents to other documents. I believe we need to have
>> one field in document which stores connections of that document so that
>> graph traversal is possible. If not, what is the other the way to index
>> graph data and use graph traversal. I am trying to explore graph traversal
>> and am new to it. Any help would be appreciated.
>> 
>> Thanks,
>> Pratik
>> 



Re: Using multi valued field in solr cloud Graph Traversal Query

2017-04-24 Thread Ganesh M
Hi Joel,

Any idea from when multi value field is supported for gatherNodes ? I am
using version 6.5 ? Is it already there ?

Kindly update,
Ganesh

On Sat, Mar 11, 2017 at 7:51 AM Joel Bernstein  wrote:

> Currently gatherNodes only works on single value fields. You can seed a
> gatherNodes with a facet() expression which works with multi-value fields,
> but after that it only works with single value fields.
>
> So you would have to index the data as a graph like this:
>
> id, concept1, participant1
> id, concept1, participant2
> id, concept2, participant1
> id, concept2, participant3
> id, concept3, participant2
> 
>
> Then you walk the graph like this:
>
> gatherNodes(mydata,
>   gatheNodes(mydata, walk="concept1->conceptID",
> gather="participantID")
>   walk="node->particpantID",
>   gather="conceptID")
>
> This is a two step graph expression:
> 1) Gathers all the participantID's where concept1 is in the conceptID
> field.
> 2) Gathers all the conceptID's for the participantID's gathered in step 1.
>
> Let me know if you have other questions about how to structure the data or
> run the queries.
>
>
>
>
>
>
>
>
> Adding multi-value field support is a fairly high priority so I would
> expect this to be coming in a future release.
>
>
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Fri, Mar 10, 2017 at 5:15 PM, Pratik Patel  wrote:
>
> > I am trying to do a graph traversal query using gatherNode function. I am
> > seeding a streaming expression to get some documents and then I am trying
> > to map their ids(conceptid) to a multi valued field "participantIds" and
> > gather nodes.
> >
> > Here is the query I am doing.
> >
> >
> > gatherNodes(collection1,
> > > search(collection1,q="*:*",fl="conceptid",sort="conceptid
> > > asc",fq=storeid:"524efcfd505637004b1f6f24",fq=tags:"Project"),
> > > walk=conceptid->participantIds,
> > > gather="conceptid")
> >
> >
> > The field participantIds is a multi valued field. This is the field which
> > holds connections between the documents. When I execute this query, I get
> > exception as below.
> >
> >
> > { "result-set": { "docs": [ { "EXCEPTION":
> > "java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> > java.io.IOException: java.util.concurrent.ExecutionException:
> > java.io.IOException: -->
> > http://169.254.40.158:8081/solr/collection1_shard1_replica1/:can not
> sort
> > on multivalued field: participantIds", "EOF": true, "RESPONSE_TIME": 15
> } ]
> > } }
> >
> >
> > Does this mean you can not look into multivalued fields in graph
> traversal
> > query? In our solr index, we have documents having "conceptid" field
> which
> > is id and we have participantIds which is a multivalued field storing
> > connections of that documents to other documents. I believe we need to
> have
> > one field in document which stores connections of that document so that
> > graph traversal is possible. If not, what is the other the way to index
> > graph data and use graph traversal. I am trying to explore graph
> traversal
> > and am new to it. Any help would be appreciated.
> >
> > Thanks,
> > Pratik
> >
>


Re: Using multi valued field in solr cloud Graph Traversal Query

2017-04-24 Thread mganeshs
Hi Joel,

Any idea from when multi value field is supported for gatherNodes ? I am
using version 6.5 ? Is it already there ? 

Kindly update,
Ganesh



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-multi-valued-field-in-solr-cloud-Graph-Traversal-Query-tp4324379p4331663.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using multi valued field in solr cloud Graph Traversal Query

2017-03-10 Thread Joel Bernstein
Currently gatherNodes only works on single value fields. You can seed a
gatherNodes with a facet() expression which works with multi-value fields,
but after that it only works with single value fields.

So you would have to index the data as a graph like this:

id, concept1, participant1
id, concept1, participant2
id, concept2, participant1
id, concept2, participant3
id, concept3, participant2


Then you walk the graph like this:

gatherNodes(mydata,
  gatheNodes(mydata, walk="concept1->conceptID",
gather="participantID")
  walk="node->particpantID",
  gather="conceptID")

This is a two step graph expression:
1) Gathers all the participantID's where concept1 is in the conceptID
field.
2) Gathers all the conceptID's for the participantID's gathered in step 1.

Let me know if you have other questions about how to structure the data or
run the queries.








Adding multi-value field support is a fairly high priority so I would
expect this to be coming in a future release.




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

On Fri, Mar 10, 2017 at 5:15 PM, Pratik Patel  wrote:

> I am trying to do a graph traversal query using gatherNode function. I am
> seeding a streaming expression to get some documents and then I am trying
> to map their ids(conceptid) to a multi valued field "participantIds" and
> gather nodes.
>
> Here is the query I am doing.
>
>
> gatherNodes(collection1,
> > search(collection1,q="*:*",fl="conceptid",sort="conceptid
> > asc",fq=storeid:"524efcfd505637004b1f6f24",fq=tags:"Project"),
> > walk=conceptid->participantIds,
> > gather="conceptid")
>
>
> The field participantIds is a multi valued field. This is the field which
> holds connections between the documents. When I execute this query, I get
> exception as below.
>
>
> { "result-set": { "docs": [ { "EXCEPTION":
> "java.util.concurrent.ExecutionException: java.lang.RuntimeException:
> java.io.IOException: java.util.concurrent.ExecutionException:
> java.io.IOException: -->
> http://169.254.40.158:8081/solr/collection1_shard1_replica1/:can not sort
> on multivalued field: participantIds", "EOF": true, "RESPONSE_TIME": 15 } ]
> } }
>
>
> Does this mean you can not look into multivalued fields in graph traversal
> query? In our solr index, we have documents having "conceptid" field which
> is id and we have participantIds which is a multivalued field storing
> connections of that documents to other documents. I believe we need to have
> one field in document which stores connections of that document so that
> graph traversal is possible. If not, what is the other the way to index
> graph data and use graph traversal. I am trying to explore graph traversal
> and am new to it. Any help would be appreciated.
>
> Thanks,
> Pratik
>


Using multi valued field in solr cloud Graph Traversal Query

2017-03-10 Thread Pratik Patel
I am trying to do a graph traversal query using gatherNode function. I am
seeding a streaming expression to get some documents and then I am trying
to map their ids(conceptid) to a multi valued field "participantIds" and
gather nodes.

Here is the query I am doing.


gatherNodes(collection1,
> search(collection1,q="*:*",fl="conceptid",sort="conceptid
> asc",fq=storeid:"524efcfd505637004b1f6f24",fq=tags:"Project"),
> walk=conceptid->participantIds,
> gather="conceptid")


The field participantIds is a multi valued field. This is the field which
holds connections between the documents. When I execute this query, I get
exception as below.


{ "result-set": { "docs": [ { "EXCEPTION":
"java.util.concurrent.ExecutionException: java.lang.RuntimeException:
java.io.IOException: java.util.concurrent.ExecutionException:
java.io.IOException: -->
http://169.254.40.158:8081/solr/collection1_shard1_replica1/:can not sort
on multivalued field: participantIds", "EOF": true, "RESPONSE_TIME": 15 } ]
} }


Does this mean you can not look into multivalued fields in graph traversal
query? In our solr index, we have documents having "conceptid" field which
is id and we have participantIds which is a multivalued field storing
connections of that documents to other documents. I believe we need to have
one field in document which stores connections of that document so that
graph traversal is possible. If not, what is the other the way to index
graph data and use graph traversal. I am trying to explore graph traversal
and am new to it. Any help would be appreciated.

Thanks,
Pratik