You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by jpereira <jp...@gmail.com> on 2016/06/07 14:28:34 UTC

Streaming expressions malfunctioning

Hi there,

I just recently upgraded a SOLR instance to 6.0.1 version and while been
trying the new streaming expressions feature I discovered what I think might
be a bug in the HTTP interface.

I tried to create two simple streaming expressions, as described below:

innerJoin(
	search(collection1,zkhost="localhost:9983",qt="/export",fl="id",sort="id
asc",q="*:*"),
	search(collection2,zkhost="localhost:9983",qt="/export",fl="id",sort="id
asc",q="*:*"),
	on("id")
)

facet(
	collection3,
	q="*:*",
	buckets="field1",
	bucketSorts="sum(field2) asc",
	sum(field2),
	count(*)
)

What I noticed is while I can obtain the expressions results using JAVA, the
feature does not seem to function when I try to get the same data via cURL.
You can see the code snippets I used below. Can you tell me if I am doing
anything wrong or if this is indeed a bug in this version?

Inner Join expression

HTTP/PHP (not working)

Request:



JAVA (working)



Facet Expression

HTTP/PHP

Request:


JAVA



Thanks for the help!

Regards,

João Pereira



--
View this message in context: http://lucene.472066.n3.nabble.com/Streaming-expressions-malfunctioning-tp4281016.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Streaming expressions malfunctioning

Posted by vrindavda <vr...@gmail.com>.
Hello,

I am looking for similar use case. Will it be possible for you to share the
corrected syntax ?



--
View this message in context: http://lucene.472066.n3.nabble.com/Streaming-expressions-malfunctioning-tp4281016p4290528.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Streaming expressions malfunctioning

Posted by jpereira <jp...@gmail.com>.
Hi,

Actually there were errors in the expression synthax , examining the logs
allowed me to see what the error was.

Thanks



--
View this message in context: http://lucene.472066.n3.nabble.com/Streaming-expressions-malfunctioning-tp4281016p4281198.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Streaming expressions malfunctioning

Posted by Joel Bernstein <jo...@gmail.com>.
I'm not a big user of curl when I test the http interface. Most of the time
I use a browser and just send the request and view the results. This won't
be feasible if you're streaming a large number of documents but it will
work to quickly prototype expressions. I believe chrome will also handle
the URLencoding of the expression, but I usually URLencode the expression
before sending it down.


In Solr 6.1 the admin screen has a console for sending expressions which is
really nice. Also I believe Solr 6.1 does a better job of bubbling up the
error message all the way to the client.

In my testing all the expressions work from the http interface. But as they
get more complex it's easier to introduce errors into the syntax. If the
error that is returned to the client isn't clear enough you can check the
logs for the full stack trace.



Joel Bernstein
http://joelsolr.blogspot.com/

On Tue, Jun 7, 2016 at 10:38 AM, jpereira <jp...@gmail.com> wrote:

> EDIT: I'll keep testing with other stream sources/decorators. So far only
> the
> search endpoint works both in the JAVA and cURL implementation
>
> Cheers
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Streaming-expressions-malfunctioning-tp4281016p4281019.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Streaming expressions malfunctioning

Posted by jpereira <jp...@gmail.com>.
EDIT: I'll keep testing with other stream sources/decorators. So far only the
search endpoint works both in the JAVA and cURL implementation

Cheers



--
View this message in context: http://lucene.472066.n3.nabble.com/Streaming-expressions-malfunctioning-tp4281016p4281019.html
Sent from the Solr - User mailing list archive at Nabble.com.