Try:
fetch(names,
select(
nodes(emails,
walk="[email protected]>from",
gather="to"),
node as to_s),
fl="name",
on="to_s=email")
According to the docs it looks like you have the fields reversed on the
fetch. If that doesn't work, I'll investigate further.
Joel Bernstein
http://joelsolr.blogspot.com/
On Fri, Jul 19, 2019 at 5:51 AM Ahmed Adel <[email protected]> wrote:
> Hi Joel,
>
> Thank you for your thoughts. I tried the fetch function, however, the
> response does not contain "fl" fields of the "fetch" expression. For the
> above example, the modified query is as follows:
>
> fetch(names, select(nodes(emails,
> walk="[email protected]>from",
> gather="to"), node as to_s), fl="name", on="email=to_s")
>
>
> where "names" is a collection that contains two fields representing pairs
> of name and email: ("name", "email")
>
> The response returned is:
>
> { "result-set": { "docs": [ { "to_s": "[email protected]"
> }, { "to_s": "[email protected]"
> },
> ... { "EOF": true, "RESPONSE_TIME": 33 } ] } }
>
> The response should have an additional "name" field in each document
> returned. Any additional thoughts are appreciated.
>
> Best,
> A.
>
> On Thu, Jul 18, 2019 at 6:12 PM Joel Bernstein <[email protected]> wrote:
>
> > Hi Ahmed,
> >
> > Take a look at the fetch
> >
> >
> https://lucene.apache.org/solr/guide/8_0/stream-decorator-reference.html#fetch
> >
> > It probably makes sense to allow more field to be returned from a nodes
> > expression as well.
> >
> > Joel Bernstein
> > http://joelsolr.blogspot.com/
> >
> >
> > On Wed, Jul 17, 2019 at 3:12 AM Ahmed Adel <[email protected]> wrote:
> >
> > > Hi,
> > >
> > > Thank you for your reply. Could you give more details on the „join“
> > > operation, such as what the sides of the join and the joining condition
> > > would be in this case?
> > >
> > > Best regards,
> > > A.
> > >
> > > On Tue, Jul 16, 2019 at 2:02 PM markus kalkbrenner <
> > > [email protected]> wrote:
> > >
> > > >
> > > >
> > > > You have to perform a „join“ to get more fields.
> > > >
> > > > > Am 16.07.2019 um 13:52 schrieb Ahmed Adel <[email protected]>:
> > > > >
> > > > > Hi,
> > > > >
> > > > > How can multiple fields be returned in graph traversal streaming
> > > > expression
> > > > > response documents? For example, the following query:
> > > > >
> > > > > nodes(emails,
> > > > > walk="[email protected]>from",
> > > > > gather="to")
> > > > >
> > > > >
> > > > > returns these documents in the response:
> > > > >
> > > > > {
> > > > > "result-set": {
> > > > > "docs": [
> > > > > {
> > > > > "node": "[email protected]",
> > > > > "collection": "emails",
> > > > > "field": "to",
> > > > > "level": 1
> > > > > },
> > > > > {
> > > > > "node": "[email protected]",
> > > > > "collection": "emails",
> > > > > "field": "to",
> > > > > "level": 1
> > > > > },
> > > > > {
> > > > > "node": "[email protected]",
> > > > > "collection": "emails",
> > > > > "field": "to",
> > > > > "level": 1
> > > > > },
> > > > > {
> > > > > "EOF": true,
> > > > > "RESPONSE_TIME": 44
> > > > > }
> > > > > ]
> > > > > }
> > > > > }
> > > > >
> > > > > How can the query above be modified to return more document fields,
> > > > > "subject" for example?
> > > > >
> > > > > Best regards,
> > > > >
> > > > > A.
> > > >
> > >
> >
>