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