From solr-user-return-148673-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Mon Jul 1 21:57:45 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id DA1F8180670 for ; Mon, 1 Jul 2019 23:57:44 +0200 (CEST) Received: (qmail 49675 invoked by uid 500); 1 Jul 2019 21:57:39 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 49663 invoked by uid 99); 1 Jul 2019 21:57:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2019 21:57:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 11408180F4F for ; Mon, 1 Jul 2019 21:57:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.087 X-Spam-Level: *** X-Spam-Status: No, score=3.087 tagged_above=-999 required=6.31 tests=[DC_PNG_UNO_LARGO=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_IMAGE_ONLY_24=1.282, HTML_IMAGE_RATIO_06=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=semandex.net Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id N8L01D0iNdDq for ; Mon, 1 Jul 2019 21:57:33 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::62c; helo=mail-pl1-x62c.google.com; envelope-from=pratik@semandex.net; receiver= Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 5C6DD7E208 for ; Mon, 1 Jul 2019 21:57:32 +0000 (UTC) Received: by mail-pl1-x62c.google.com with SMTP id i2so8009750plt.1 for ; Mon, 01 Jul 2019 14:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semandex.net; s=gmail; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=3kBo2PGfbgGRHr1kBrfJoaMASLX9UYQALrTjyo812wA=; b=LXUEj3MZzed5/l8JyG8x+RylHJYWc034zJ0BJiBddHnAZez9NAz9a9nupqPznIpG/o I3ZQnl8Gxf1q+nEbmzjgV3UfyxQEAEEkMhpuVFIlKldcKqNItytv8KK2kLx6Gny4KaFZ K9wE7Rh1tHBNmWtI/GK2LhNEXqORp9fBhqxYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=3kBo2PGfbgGRHr1kBrfJoaMASLX9UYQALrTjyo812wA=; b=dRztarkRo6k1cQRAffhj8SRg5Ju6I9F/yqD1dtGI3umni391Q6AmtGW/lsGPrIohsc N9eKChCvdggr/cAZnHR/kgIt83YwCd4YsqYEhuvhD3x8thCDg0nQbNeXHAHmh7LsWdBO XJ4oT3tNBvNBxK9pg+VoU/Y3H2SXbybqo4SOvRff6bHLL1j6BjD6lFtEHOFUeuLMuJGs 9nrPaJz5NNjkfXbgBptBor2pTDyeh6UtHYcQonUFzLxy14V+E+9VZcG+pHc88jRKYY0d LvK9zZ7XQUeBR+xgJWbYOYOShdx1TlSJsolxQd1DznSZHYLEX9rl6ji/BXyCdAEa/vQu zWtQ== X-Gm-Message-State: APjAAAWGwOgVTpGn7j5FvRo0Z78Fsrkc3/GpYM3NGSC5rVaWa7TpYNLC NOPV/JPC2QaBVOF4hecIZkSG4MsJhj2SI+GaRdfU9XzKc/E= X-Google-Smtp-Source: APXvYqznmQEB3cn0TgjASU+iZ03G+kVYSAGw73dg9G9JCaKOU7WrJy65gpeM4ErYZPkWooXLTFE5AvzRTQ3sB8NfqgU= X-Received: by 2002:a17:902:8c98:: with SMTP id t24mr32222324plo.320.1562018244713; Mon, 01 Jul 2019 14:57:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pratik Patel Date: Mon, 1 Jul 2019 17:57:13 -0400 Message-ID: Subject: Re: Bug in scoreNodes function of streaming expressions? To: solr-user@lucene.apache.org Content-Type: multipart/related; boundary="0000000000009c6186058ca5b6fa" --0000000000009c6186058ca5b6fa Content-Type: multipart/alternative; boundary="0000000000009c6185058ca5b6f9" --0000000000009c6185058ca5b6f9 Content-Type: text/plain; charset="UTF-8" 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 > --0000000000009c6185058ca5b6f9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think the problem was that my streaming expression was a= lways returning just one node. When I added more data so that I can have mo= re than one node, I started seeing the result.

On Mon, Jul 1, 2019 at 11= :21 AM Pratik Patel <pratik@semandex.net> wrote:
Hello Everyone,

I am trying to execute following streaming expression with "scor= eNodes" function in it. This is taken from the documentation.

scoreNodes(top(n=3D"50",
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sort=3D"count(*) desc= ",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0nodes(baskets,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0random(baskets, q=3D"productI= D:ABC", fl=3D"basketID", rows=3D"500"),
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0walk=3D"basketID->basketID",
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fq=3D= "-productID:ABC",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0gather=3D"productID&qu= ot;,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0count(*))))

I have ens= ured that I have the collection and data present for it.
Upon exe= cuting this, I am getting an error message as follows.

=
"No collection param specified on request and no default collecti= on has been set: []"

Upon digging into the so= urce code I found that there is a possible bug in ScoreNodesStream.java

StringBuilder instance is never appended any string a= nd the block which initializes collection, needs the length of that instanc= e to be more than zero. This condition will always be false and hence the c= ollection will never be set.

I checked this file i= n solr version 8.1 and that also has the same issue. Is there any JIRA open= for this or any patch available?

3D"image.png"

Thanks,
Pratik
--0000000000009c6185058ca5b6f9-- --0000000000009c6186058ca5b6fa--