Re: Bug in scoreNodes function of streaming expressions?
Thanks a lot. I will update the ticket with more details if appropriate. Pratik On Wed, Jan 29, 2020 at 10:07 AM Joel Bernstein wrote: > Here is the ticket: > https://issues.apache.org/jira/browse/SOLR-14231 > > > Joel Bernstein > http://joelsolr.blogspot.com/ > > > On Wed, Jan 29, 2020 at 10:03 AM Joel Bernstein > wrote: > > > Hi Pratik, > > > > I'll create the ticket now and report back. If you've got a fix please > > post it to the ticket and I'll try to get this in for the next release. > > > > Joel Bernstein > > http://joelsolr.blogspot.com/ > > > > > > On Tue, Jan 28, 2020 at 11:52 AM pratik@semandex > > wrote: > > > >> Joel Bernstein wrote > >> > Ok, that sounds like a bug. I can create a ticket for this. > >> > > >> > On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel > >> > >> > pratik@ > >> > >> > wrote: > >> > > >> >> I think the problem was that my streaming expression was always > >> returning > >> >> just one node. When I added more data so that I can have more than > one > >> >> node, I started seeing the result. > >> >> > >> >> On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel > >> > >> > pratik@ > >> > >> > wrote: > >> >> > >> >>> Hello Everyone, > >> >>> > >> >>> I am trying to execute following streaming expression with > >> "scoreNodes" > >> >>> function in it. This is taken from the documentation. > >> >>> > >> >>> scoreNodes(top(n="50", > >> >>>sort="count(*) desc", > >> >>>nodes(baskets, > >> >>> random(baskets, q="productID:ABC", > >> >>> fl="basketID", rows="500"), > >> >>> walk="basketID->basketID", > >> >>> fq="-productID:ABC", > >> >>> gather="productID", > >> >>> count(* > >> >>> > >> >>> I have ensured that I have the collection and data present for it. > >> >>> Upon executing this, I am getting an error message as follows. > >> >>> > >> >>> "No collection param specified on request and no default collection > >> has > >> >>> been set: []" > >> >>> > >> >>> Upon digging into the source code I found that there is a possible > bug > >> >>> in > >> >>> ScoreNodesStream.java > >> >>> > >> >>> StringBuilder instance is never appended any string and the block > >> which > >> >>> initializes collection, needs the length of that instance to be more > >> >>> than > >> >>> zero. This condition will always be false and hence the collection > >> will > >> >>> never be set. > >> >>> > >> >>> I checked this file in solr version 8.1 and that also has the same > >> >>> issue. > >> >>> Is there any JIRA open for this or any patch available? > >> >>> > >> >>> [image: image.png] > >> >>> > >> >>> Thanks, > >> >>> Pratik > >> >>> > >> >> > >> > >> > >> Hi Joel, > >> > >> You mentioned creating a ticket for this bug, I can't find any, was it > >> created? If not then I can create one. Currently, ScoreNodes has two > >> issues. > >> > >> 1. It fails when result has only one node. > >> 2. It triggers a GET request instead of POST. GET fails if number of > nodes > >> is large. > >> > >> I have been using a custom class as workaround for #2, it would be good > to > >> use the original SolrJ class. > >> > >> Thanks, > >> Pratik > >> > >> > >> > >> -- > >> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html > >> > > >
Re: Bug in scoreNodes function of streaming expressions?
Here is the ticket: https://issues.apache.org/jira/browse/SOLR-14231 Joel Bernstein http://joelsolr.blogspot.com/ On Wed, Jan 29, 2020 at 10:03 AM Joel Bernstein wrote: > Hi Pratik, > > I'll create the ticket now and report back. If you've got a fix please > post it to the ticket and I'll try to get this in for the next release. > > Joel Bernstein > http://joelsolr.blogspot.com/ > > > On Tue, Jan 28, 2020 at 11:52 AM pratik@semandex > wrote: > >> Joel Bernstein wrote >> > Ok, that sounds like a bug. I can create a ticket for this. >> > >> > On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel >> >> > pratik@ >> >> > wrote: >> > >> >> I think the problem was that my streaming expression was always >> returning >> >> just one node. When I added more data so that I can have more than one >> >> node, I started seeing the result. >> >> >> >> On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel >> >> > pratik@ >> >> > wrote: >> >> >> >>> Hello Everyone, >> >>> >> >>> I am trying to execute following streaming expression with >> "scoreNodes" >> >>> function in it. This is taken from the documentation. >> >>> >> >>> scoreNodes(top(n="50", >> >>>sort="count(*) desc", >> >>>nodes(baskets, >> >>> random(baskets, q="productID:ABC", >> >>> fl="basketID", rows="500"), >> >>> walk="basketID->basketID", >> >>> fq="-productID:ABC", >> >>> gather="productID", >> >>> count(* >> >>> >> >>> I have ensured that I have the collection and data present for it. >> >>> Upon executing this, I am getting an error message as follows. >> >>> >> >>> "No collection param specified on request and no default collection >> has >> >>> been set: []" >> >>> >> >>> Upon digging into the source code I found that there is a possible bug >> >>> in >> >>> ScoreNodesStream.java >> >>> >> >>> StringBuilder instance is never appended any string and the block >> which >> >>> initializes collection, needs the length of that instance to be more >> >>> than >> >>> zero. This condition will always be false and hence the collection >> will >> >>> never be set. >> >>> >> >>> I checked this file in solr version 8.1 and that also has the same >> >>> issue. >> >>> Is there any JIRA open for this or any patch available? >> >>> >> >>> [image: image.png] >> >>> >> >>> Thanks, >> >>> Pratik >> >>> >> >> >> >> >> Hi Joel, >> >> You mentioned creating a ticket for this bug, I can't find any, was it >> created? If not then I can create one. Currently, ScoreNodes has two >> issues. >> >> 1. It fails when result has only one node. >> 2. It triggers a GET request instead of POST. GET fails if number of nodes >> is large. >> >> I have been using a custom class as workaround for #2, it would be good to >> use the original SolrJ class. >> >> Thanks, >> Pratik >> >> >> >> -- >> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html >> >
Re: Bug in scoreNodes function of streaming expressions?
Hi Pratik, I'll create the ticket now and report back. If you've got a fix please post it to the ticket and I'll try to get this in for the next release. Joel Bernstein http://joelsolr.blogspot.com/ On Tue, Jan 28, 2020 at 11:52 AM pratik@semandex wrote: > Joel Bernstein wrote > > Ok, that sounds like a bug. I can create a ticket for this. > > > > On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel > > > pratik@ > > > wrote: > > > >> I think the problem was that my streaming expression was always > returning > >> just one node. When I added more data so that I can have more than one > >> node, I started seeing the result. > >> > >> On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel > > > pratik@ > > > wrote: > >> > >>> Hello Everyone, > >>> > >>> I am trying to execute following streaming expression with "scoreNodes" > >>> function in it. This is taken from the documentation. > >>> > >>> scoreNodes(top(n="50", > >>>sort="count(*) desc", > >>>nodes(baskets, > >>> random(baskets, q="productID:ABC", > >>> fl="basketID", rows="500"), > >>> walk="basketID->basketID", > >>> fq="-productID:ABC", > >>> gather="productID", > >>> count(* > >>> > >>> I have ensured that I have the collection and data present for it. > >>> Upon executing this, I am getting an error message as follows. > >>> > >>> "No collection param specified on request and no default collection has > >>> been set: []" > >>> > >>> Upon digging into the source code I found that there is a possible bug > >>> in > >>> ScoreNodesStream.java > >>> > >>> StringBuilder instance is never appended any string and the block which > >>> initializes collection, needs the length of that instance to be more > >>> than > >>> zero. This condition will always be false and hence the collection will > >>> never be set. > >>> > >>> I checked this file in solr version 8.1 and that also has the same > >>> issue. > >>> Is there any JIRA open for this or any patch available? > >>> > >>> [image: image.png] > >>> > >>> Thanks, > >>> Pratik > >>> > >> > > > Hi Joel, > > You mentioned creating a ticket for this bug, I can't find any, was it > created? If not then I can create one. Currently, ScoreNodes has two > issues. > > 1. It fails when result has only one node. > 2. It triggers a GET request instead of POST. GET fails if number of nodes > is large. > > I have been using a custom class as workaround for #2, it would be good to > use the original SolrJ class. > > Thanks, > Pratik > > > > -- > Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html >
Re: Bug in scoreNodes function of streaming expressions?
Joel Bernstein wrote > Ok, that sounds like a bug. I can create a ticket for this. > > On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel > pratik@ > wrote: > >> I think the problem was that my streaming expression was always returning >> just one node. When I added more data so that I can have more than one >> node, I started seeing the result. >> >> On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel > pratik@ > wrote: >> >>> Hello Everyone, >>> >>> I am trying to execute following streaming expression with "scoreNodes" >>> function in it. This is taken from the documentation. >>> >>> scoreNodes(top(n="50", >>>sort="count(*) desc", >>>nodes(baskets, >>> random(baskets, q="productID:ABC", >>> fl="basketID", rows="500"), >>> walk="basketID->basketID", >>> fq="-productID:ABC", >>> gather="productID", >>> count(* >>> >>> I have ensured that I have the collection and data present for it. >>> Upon executing this, I am getting an error message as follows. >>> >>> "No collection param specified on request and no default collection has >>> been set: []" >>> >>> Upon digging into the source code I found that there is a possible bug >>> in >>> ScoreNodesStream.java >>> >>> StringBuilder instance is never appended any string and the block which >>> initializes collection, needs the length of that instance to be more >>> than >>> zero. This condition will always be false and hence the collection will >>> never be set. >>> >>> I checked this file in solr version 8.1 and that also has the same >>> issue. >>> Is there any JIRA open for this or any patch available? >>> >>> [image: image.png] >>> >>> Thanks, >>> Pratik >>> >> Hi Joel, You mentioned creating a ticket for this bug, I can't find any, was it created? If not then I can create one. Currently, ScoreNodes has two issues. 1. It fails when result has only one node. 2. It triggers a GET request instead of POST. GET fails if number of nodes is large. I have been using a custom class as workaround for #2, it would be good to use the original SolrJ class. Thanks, Pratik -- Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: Bug in scoreNodes function of streaming expressions?
Hi Joel, There also seems to be an issue related to how QueryRequest instance is created in scoreNodes implementation. It seems to be using GET method instead of POST. As a result, when underlying stream is big, scoreNodes function fails with an exception "URI is too large" I found a related is issue mentioned here, http://lucene.472066.n3.nabble.com/Streaming-Expressions-GET-vs-POST-td4415044.html ScoreNodesStream.java initializes QueryRequest as follows. QueryRequest request = new QueryRequest(params); vs TimeSeriesStream.java which does it like this. QueryRequest request = new QueryRequest(paramsLoc, SolrRequest.METHOD.POST); Is this also a bug? On Tue, Jul 2, 2019 at 10:17 AM Pratik Patel wrote: > Great, thanks! > > On Tue, Jul 2, 2019 at 6:37 AM Joel Bernstein wrote: > >> Ok, that sounds like a bug. I can create a ticket for this. >> >> On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel wrote: >> >> > I think the problem was that my streaming expression was always >> returning >> > just one node. When I added more data so that I can have more than one >> > node, I started seeing the result. >> > >> > On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel >> wrote: >> > >> >> Hello Everyone, >> >> >> >> I am trying to execute following streaming expression with "scoreNodes" >> >> function in it. This is taken from the documentation. >> >> >> >> scoreNodes(top(n="50", >> >>sort="count(*) desc", >> >>nodes(baskets, >> >> random(baskets, q="productID:ABC", >> >> fl="basketID", rows="500"), >> >> walk="basketID->basketID", >> >> fq="-productID:ABC", >> >> gather="productID", >> >> count(* >> >> >> >> I have ensured that I have the collection and data present for it. >> >> Upon executing this, I am getting an error message as follows. >> >> >> >> "No collection param specified on request and no default collection has >> >> been set: []" >> >> >> >> Upon digging into the source code I found that there is a possible bug >> in >> >> ScoreNodesStream.java >> >> >> >> StringBuilder instance is never appended any string and the block which >> >> initializes collection, needs the length of that instance to be more >> than >> >> zero. This condition will always be false and hence the collection will >> >> never be set. >> >> >> >> I checked this file in solr version 8.1 and that also has the same >> issue. >> >> Is there any JIRA open for this or any patch available? >> >> >> >> [image: image.png] >> >> >> >> Thanks, >> >> Pratik >> >> >> > >> >
Re: Bug in scoreNodes function of streaming expressions?
Great, thanks! On Tue, Jul 2, 2019 at 6:37 AM Joel Bernstein wrote: > Ok, that sounds like a bug. I can create a ticket for this. > > On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel wrote: > > > I think the problem was that my streaming expression was always returning > > just one node. When I added more data so that I can have more than one > > node, I started seeing the result. > > > > On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel > wrote: > > > >> Hello Everyone, > >> > >> I am trying to execute following streaming expression with "scoreNodes" > >> function in it. This is taken from the documentation. > >> > >> scoreNodes(top(n="50", > >>sort="count(*) desc", > >>nodes(baskets, > >> random(baskets, q="productID:ABC", > >> fl="basketID", rows="500"), > >> walk="basketID->basketID", > >> fq="-productID:ABC", > >> gather="productID", > >> count(* > >> > >> I have ensured that I have the collection and data present for it. > >> Upon executing this, I am getting an error message as follows. > >> > >> "No collection param specified on request and no default collection has > >> been set: []" > >> > >> Upon digging into the source code I found that there is a possible bug > in > >> ScoreNodesStream.java > >> > >> StringBuilder instance is never appended any string and the block which > >> initializes collection, needs the length of that instance to be more > than > >> zero. This condition will always be false and hence the collection will > >> never be set. > >> > >> I checked this file in solr version 8.1 and that also has the same > issue. > >> Is there any JIRA open for this or any patch available? > >> > >> [image: image.png] > >> > >> Thanks, > >> Pratik > >> > > >
Re: Bug in scoreNodes function of streaming expressions?
Ok, that sounds like a bug. I can create a ticket for this. On Mon, Jul 1, 2019 at 5:57 PM Pratik Patel wrote: > I think the problem was that my streaming expression was always returning > just one node. When I added more data so that I can have more than one > node, I started seeing the result. > > On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel wrote: > >> Hello Everyone, >> >> I am trying to execute following streaming expression with "scoreNodes" >> function in it. This is taken from the documentation. >> >> scoreNodes(top(n="50", >>sort="count(*) desc", >>nodes(baskets, >> random(baskets, q="productID:ABC", >> fl="basketID", rows="500"), >> walk="basketID->basketID", >> fq="-productID:ABC", >> gather="productID", >> count(* >> >> I have ensured that I have the collection and data present for it. >> Upon executing this, I am getting an error message as follows. >> >> "No collection param specified on request and no default collection has >> been set: []" >> >> Upon digging into the source code I found that there is a possible bug in >> ScoreNodesStream.java >> >> StringBuilder instance is never appended any string and the block which >> initializes collection, needs the length of that instance to be more than >> zero. This condition will always be false and hence the collection will >> never be set. >> >> I checked this file in solr version 8.1 and that also has the same issue. >> Is there any JIRA open for this or any patch available? >> >> [image: image.png] >> >> Thanks, >> Pratik >> >
Re: Bug in scoreNodes function of streaming expressions?
I think the problem was that my streaming expression was always returning just one node. When I added more data so that I can have more than one node, I started seeing the result. On Mon, Jul 1, 2019 at 11:21 AM Pratik Patel wrote: > Hello Everyone, > > I am trying to execute following streaming expression with "scoreNodes" > function in it. This is taken from the documentation. > > scoreNodes(top(n="50", >sort="count(*) desc", >nodes(baskets, > random(baskets, q="productID:ABC", fl="basketID", > rows="500"), > walk="basketID->basketID", > fq="-productID:ABC", > gather="productID", > count(* > > I have ensured that I have the collection and data present for it. > Upon executing this, I am getting an error message as follows. > > "No collection param specified on request and no default collection has > been set: []" > > Upon digging into the source code I found that there is a possible bug in > ScoreNodesStream.java > > StringBuilder instance is never appended any string and the block which > initializes collection, needs the length of that instance to be more than > zero. This condition will always be false and hence the collection will > never be set. > > I checked this file in solr version 8.1 and that also has the same issue. > Is there any JIRA open for this or any patch available? > > [image: image.png] > > Thanks, > Pratik >
Bug in scoreNodes function of streaming expressions?
Hello Everyone, I am trying to execute following streaming expression with "scoreNodes" function in it. This is taken from the documentation. scoreNodes(top(n="50", sort="count(*) desc", nodes(baskets, random(baskets, q="productID:ABC", fl="basketID", rows="500"), walk="basketID->basketID", fq="-productID:ABC", gather="productID", count(* I have ensured that I have the collection and data present for it. Upon executing this, I am getting an error message as follows. "No collection param specified on request and no default collection has been set: []" Upon digging into the source code I found that there is a possible bug in ScoreNodesStream.java StringBuilder instance is never appended any string and the block which initializes collection, needs the length of that instance to be more than zero. This condition will always be false and hence the collection will never be set. I checked this file in solr version 8.1 and that also has the same issue. Is there any JIRA open for this or any patch available? [image: image.png] Thanks, Pratik