I tried below query  and it returns o results

http://localhost:8983/solr/knr/export?{!terms+f%3Dproduct_s}product1&distrib=false&fl=basket_s,product_s&sort=basket_s+asc,product_s+asc&wt=json&version=2.2


{
  "responseHeader":{"status":0},
  "response":{
    "numFound":0,
    "docs":[]}}

Regards,
Rajeswari
On Thu, Oct 17, 2019 at 8:05 AM Rajeswari Natarajan <rajis...@gmail.com>
wrote:

> Thanks Joel.
>
> Here is the logs for below request
>
> curl --data-urlencode
> 'expr=gatherNodes(knr,walk="product1->product_s",gather="basket_s")'
> http://localhost:8983/solr/knr/stream
>
> 2019-10-17 15:02:06.969 INFO  (qtp952486988-280) [c:knr s:shard1
> r:core_node2 x:knr_shard1_replica_n1] o.a.s.c.S.Request
> [knr_shard1_replica_n1]  webapp=/solr path=/stream
> params={expr=gatherNodes(knr,walk%3D"product1->product_s",gather%3D"basket_s")}
> status=0 QTime=0
>
> 2019-10-17 15:02:06.975 INFO  (qtp952486988-192) [c:knr s:shard1
> r:core_node2 x:knr_shard1_replica_n1] o.a.s.c.S.Request
> [knr_shard1_replica_n1]  webapp=/solr path=/export
> params={q={!terms+f%3Dproduct_s}product1&distrib=false&indent=off&fl=basket_s,product_s&sort=basket_s+asc,product_s+asc&wt=json&version=2.2}
> hits=0 status=0 QTime=1
>
>
>
> Here is the logs for
>
>
>
> curl --data-urlencode
> 'expr=gatherNodes(knr,walk="product1->product_s",gather="basket_s",scatter="branches,
> leaves")' http://localhost:8983/solr/knr/stream
>
>
> 2019-10-17 15:03:57.068 INFO  (qtp952486988-356) [c:knr s:shard1
> r:core_node2 x:knr_shard1_replica_n1] o.a.s.c.S.Request
> [knr_shard1_replica_n1]  webapp=/solr path=/stream
> params={expr=gatherNodes(knr,walk%3D"product1->product_s",gather%3D"basket_s",scatter%3D"branches,+leaves")}
> status=0 QTime=0
>
> 2019-10-17 15:03:57.071 INFO  (qtp952486988-400) [c:knr s:shard1
> r:core_node2 x:knr_shard1_replica_n1] o.a.s.c.S.Request
> [knr_shard1_replica_n1]  webapp=/solr path=/export
> params={q={!terms+f%3Dproduct_s}product1&distrib=false&indent=off&fl=basket_s,product_s&sort=basket_s+asc,product_s+asc&wt=json&version=2.2}
> hits=0 status=0 QTime=0
>
>
>
>
> Thank you,
>
> Rajeswari
>
> On Thu, Oct 17, 2019 at 5:23 AM Joel Bernstein <joels...@gmail.com> wrote:
>
>> Can you show the logs from this request. There will be a Solr query that
>> gets sent with product1 searched against the product_s field. Let's see
>> how
>> many documents that query returns.
>>
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>>
>> On Thu, Oct 17, 2019 at 1:41 AM Rajeswari Natarajan <rajis...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > Since the stream graph query for my use case , didn't work as  i took
>> the
>> > data from solr source code test and also copied the schema and
>> > solrconfig.xml from solr 7.6 source code.  Had to substitute few
>> variables.
>> >
>> > Posted below data
>> >
>> > curl -X POST http://localhost:8983/solr/knr/update -H
>> > 'Content-type:text/csv' -d '
>> > id, basket_s, product_s, prics_f
>> > 90,basket1,product1,20
>> > 91,basket1,product3,30
>> > 92,basket1,product5,1
>> > 93,basket2,product1,2
>> > 94,basket2,product6,5
>> > 95,basket2,product7,10
>> > 96,basket3,product4,20
>> > 97,basket3,product3,10
>> > 98,basket3,product1,10
>> > 99,basket4,product4,40
>> > 110,basket4,product3,10
>> > 111,basket4,product1,10'
>> > After this I committed and made sure the data got published. to solr
>> >
>> > curl --data-urlencode
>> > 'expr=gatherNodes(knr,walk="product1->product_s",gather="basket_s")'
>> > http://localhost:8983/solr/knr/stream
>> >
>> > {
>> >
>> >   "result-set":{
>> >
>> >     "docs":[{
>> >
>> >         "EOF":true,
>> >
>> >         "RESPONSE_TIME":4}]}}
>> >
>> >
>> > and if I add *scatter="branches, leaves" , there is one doc.*
>> >
>> >
>> >
>> > curl --data-urlencode
>> >
>> >
>> 'expr=gatherNodes(knr,walk="product1->product_s",gather="basket_s",scatter="branches,
>> > leaves")' http://localhost:8983/solr/knr/stream
>> >
>> > {
>> >
>> >   "result-set":{
>> >
>> >     "docs":[{
>> >
>> >         "node":"product1",
>> >
>> >         "collection":"knr",
>> >
>> >         "field":"node",
>> >
>> >         "level":0}
>> >
>> >       ,{
>> >
>> >         "EOF":true,
>> >
>> >         "RESPONSE_TIME":4}]}}
>> >
>> >
>> >
>> >
>> > Below is the data I got from
>> >
>> >
>> https://github.com/apache/lucene-solr/blob/branch_7_6/solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java#L271
>> >
>> >
>> >
>> > According to this test 4 docs are expected.
>> >
>> >
>> > I am not sure what I am missing. Any pointers, please
>> >
>> >
>> > Thanks you,
>> >
>> > Rajeswari
>> >
>>
>

Reply via email to