Re: Solr 6.3.0 SQL question

2016-11-29 Thread Joel Bernstein
Let's break this down:

'stmt=SELECT TextSize from main LIMIT 10' fails
This fails because CloudSolrStream does not currently support aliases. I
believe this is fixed in 6.4

'stmt=SELECT avg(TextSize) from UNCLASS' fails
This surprises me. I read through the StatsStream and don't see any reason
why an uppercase collection should fail. Under the covers the StatsStream
simply uses the CloudSolrClient to make the call. I'll need to investigate
this further.

'stmt=SELECT like_count, DocumentId from main where like_count>0' fails
Again the issue with CloudSolrStream not supporting aliases.












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

On Tue, Nov 29, 2016 at 11:48 AM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> Just some data points.
> main is an alias for the collection UNCLASS.
>
> 'stmt=SELECT TextSize from main LIMIT 10' fails
> 'stmt=SELECT TextSize from UNCLASS LIMIT 10' succeeds
> 'stmt=SELECT avg(TextSize) from UNCLASS' fails
> 'stmt=SELECT avg(TextSize) from main' succeeds
> 'stmt=SELECT like_count, DocumentId from UNCLASS where like_count>0'
> succeeds
> 'stmt=SELECT like_count, DocumentId from main where like_count>0' fails
>
> Hope that helps.
>
>
> -Joe
>
> On 11/29/2016 9:11 AM, Joel Bernstein wrote:
>
>> I'll take a look at the StatsStream and see what the issue is.
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>> On Mon, Nov 28, 2016 at 8:32 PM, Damien Kamerman 
>> wrote:
>>
>> Aggregated selects only work with lower-case collection names (and no
>>> dashes). (Bug in StatsStream I think)
>>>
>>> I assume 'SOLR-9077 Streaming expressions should support collection
>>> alias'
>>> which is fixed in 6.4 is a work around.
>>>
>>> On 29 November 2016 at 08:29, Kevin Risden 
>>> wrote:
>>>
>>> Is there a longer error/stack trace in your Solr server logs? I wonder if
 the real error is being masked.

 Kevin Risden

 On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
 joseph.obernber...@gmail.com> wrote:

 I'm running this query:
>
> curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
> http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
>
> The error that I get back is:
>
> {"result-set":{"docs":[
> {"EXCEPTION":"org.apache.solr.common.SolrException: Collection not
>
 found:

> unclass","EOF":true,"RESPONSE_TIME":2}]}}
>
> TextSize is defined as:
> 
 multiValued="false"
>>>
 indexed="true" stored="true"/>
>
> This query works fine:
> curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
> http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
>
> Any idea what I'm doing wrong?
> Thank you!
>
> -Joe
>
>
>
>


Re: Solr 6.3.0 SQL question

2016-11-29 Thread Joe Obernberger

Just some data points.
main is an alias for the collection UNCLASS.

'stmt=SELECT TextSize from main LIMIT 10' fails
'stmt=SELECT TextSize from UNCLASS LIMIT 10' succeeds
'stmt=SELECT avg(TextSize) from UNCLASS' fails
'stmt=SELECT avg(TextSize) from main' succeeds
'stmt=SELECT like_count, DocumentId from UNCLASS where like_count>0' 
succeeds

'stmt=SELECT like_count, DocumentId from main where like_count>0' fails

Hope that helps.


-Joe

On 11/29/2016 9:11 AM, Joel Bernstein wrote:

I'll take a look at the StatsStream and see what the issue is.

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

On Mon, Nov 28, 2016 at 8:32 PM, Damien Kamerman  wrote:


Aggregated selects only work with lower-case collection names (and no
dashes). (Bug in StatsStream I think)

I assume 'SOLR-9077 Streaming expressions should support collection alias'
which is fixed in 6.4 is a work around.

On 29 November 2016 at 08:29, Kevin Risden 
wrote:


Is there a longer error/stack trace in your Solr server logs? I wonder if
the real error is being masked.

Kevin Risden

On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:


I'm running this query:

curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce

The error that I get back is:

{"result-set":{"docs":[
{"EXCEPTION":"org.apache.solr.common.SolrException: Collection not

found:

unclass","EOF":true,"RESPONSE_TIME":2}]}}

TextSize is defined as:

multiValued="false"

indexed="true" stored="true"/>

This query works fine:
curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce

Any idea what I'm doing wrong?
Thank you!

-Joe






Re: Solr 6.3.0 SQL question

2016-11-29 Thread Joe Obernberger

Created an alias called 'main' and now it works:

curl --data-urlencode 'stmt=SELECT avg(TextSize) from main' 
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce


{"result-set":{"docs":[
{"avg(TextSize)":6024.222616504568},
{"EOF":true,"RESPONSE_TIME":1391}]}}

Thank you Damian and Joel!


-Joe

On 11/29/2016 9:11 AM, Joel Bernstein wrote:

I'll take a look at the StatsStream and see what the issue is.

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

On Mon, Nov 28, 2016 at 8:32 PM, Damien Kamerman  wrote:


Aggregated selects only work with lower-case collection names (and no
dashes). (Bug in StatsStream I think)

I assume 'SOLR-9077 Streaming expressions should support collection alias'
which is fixed in 6.4 is a work around.

On 29 November 2016 at 08:29, Kevin Risden 
wrote:


Is there a longer error/stack trace in your Solr server logs? I wonder if
the real error is being masked.

Kevin Risden

On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:


I'm running this query:

curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce

The error that I get back is:

{"result-set":{"docs":[
{"EXCEPTION":"org.apache.solr.common.SolrException: Collection not

found:

unclass","EOF":true,"RESPONSE_TIME":2}]}}

TextSize is defined as:

multiValued="false"

indexed="true" stored="true"/>

This query works fine:
curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce

Any idea what I'm doing wrong?
Thank you!

-Joe






Re: Solr 6.3.0 SQL question

2016-11-29 Thread Joel Bernstein
I'll take a look at the StatsStream and see what the issue is.

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

On Mon, Nov 28, 2016 at 8:32 PM, Damien Kamerman  wrote:

> Aggregated selects only work with lower-case collection names (and no
> dashes). (Bug in StatsStream I think)
>
> I assume 'SOLR-9077 Streaming expressions should support collection alias'
> which is fixed in 6.4 is a work around.
>
> On 29 November 2016 at 08:29, Kevin Risden 
> wrote:
>
> > Is there a longer error/stack trace in your Solr server logs? I wonder if
> > the real error is being masked.
> >
> > Kevin Risden
> >
> > On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
> > joseph.obernber...@gmail.com> wrote:
> >
> > > I'm running this query:
> > >
> > > curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
> > > http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
> > >
> > > The error that I get back is:
> > >
> > > {"result-set":{"docs":[
> > > {"EXCEPTION":"org.apache.solr.common.SolrException: Collection not
> > found:
> > > unclass","EOF":true,"RESPONSE_TIME":2}]}}
> > >
> > > TextSize is defined as:
> > >  multiValued="false"
> > > indexed="true" stored="true"/>
> > >
> > > This query works fine:
> > > curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
> > > http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
> > >
> > > Any idea what I'm doing wrong?
> > > Thank you!
> > >
> > > -Joe
> > >
> > >
> >
>


Re: Solr 6.3.0 SQL question

2016-11-28 Thread Damien Kamerman
Aggregated selects only work with lower-case collection names (and no
dashes). (Bug in StatsStream I think)

I assume 'SOLR-9077 Streaming expressions should support collection alias'
which is fixed in 6.4 is a work around.

On 29 November 2016 at 08:29, Kevin Risden  wrote:

> Is there a longer error/stack trace in your Solr server logs? I wonder if
> the real error is being masked.
>
> Kevin Risden
>
> On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
> joseph.obernber...@gmail.com> wrote:
>
> > I'm running this query:
> >
> > curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
> > http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
> >
> > The error that I get back is:
> >
> > {"result-set":{"docs":[
> > {"EXCEPTION":"org.apache.solr.common.SolrException: Collection not
> found:
> > unclass","EOF":true,"RESPONSE_TIME":2}]}}
> >
> > TextSize is defined as:
> >  > indexed="true" stored="true"/>
> >
> > This query works fine:
> > curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
> > http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
> >
> > Any idea what I'm doing wrong?
> > Thank you!
> >
> > -Joe
> >
> >
>


Re: Solr 6.3.0 SQL question

2016-11-28 Thread Kevin Risden
Is there a longer error/stack trace in your Solr server logs? I wonder if
the real error is being masked.

Kevin Risden

On Mon, Nov 28, 2016 at 3:24 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> I'm running this query:
>
> curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS'
> http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
>
> The error that I get back is:
>
> {"result-set":{"docs":[
> {"EXCEPTION":"org.apache.solr.common.SolrException: Collection not found:
> unclass","EOF":true,"RESPONSE_TIME":2}]}}
>
> TextSize is defined as:
>  indexed="true" stored="true"/>
>
> This query works fine:
> curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS'
> http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce
>
> Any idea what I'm doing wrong?
> Thank you!
>
> -Joe
>
>


Solr 6.3.0 SQL question

2016-11-28 Thread Joe Obernberger

I'm running this query:

curl --data-urlencode 'stmt=SELECT avg(TextSize) from UNCLASS' 
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce


The error that I get back is:

{"result-set":{"docs":[
{"EXCEPTION":"org.apache.solr.common.SolrException: Collection not 
found: unclass","EOF":true,"RESPONSE_TIME":2}]}}


TextSize is defined as:
multiValued="false" indexed="true" stored="true"/>


This query works fine:
curl --data-urlencode 'stmt=SELECT TextSize from UNCLASS' 
http://cordelia:9100/solr/UNCLASS/sql?aggregationMode=map_reduce


Any idea what I'm doing wrong?
Thank you!

-Joe