Re: Streaming API running a simple query

2015-08-11 Thread Selvam
Hi All,

I have written a blog to cover this nested merge expressions, see
http://knackforge.com/blog/selvam/solr-streaming-expressions for more
details.

Thanks.

On Mon, Aug 10, 2015 at 3:51 PM, Selvam  wrote:

> Hi,
>
> Thanks, that seems to be working!
>
> On Sat, Aug 8, 2015 at 9:28 PM, Joel Bernstein  wrote:
>
>> This sounds doable using nested merge functions like this:
>>
>> merge(search(...),
>>merge(search(...), search(),...), ...)
>>
>> Joel Bernstein
>> http://joelsolr.blogspot.com/
>>
>> On Sat, Aug 8, 2015 at 8:08 AM, Selvam  wrote:
>>
>> > Hi,
>> >
>> > I needed to run a multiple subqueries each with its own limit of rows.
>> >
>> > For eg: to get 30 users from country India with age greater than 30 and
>> 50
>> > users from England who are all male.
>> >
>> > Thanks again.
>> > On 08-Aug-2015 5:30 pm, "Joel Bernstein"  wrote:
>> >
>> > > Can you describe your use case?
>> > >
>> > > Joel Bernstein
>> > > http://joelsolr.blogspot.com/
>> > >
>> > > On Sat, Aug 8, 2015 at 7:36 AM, Selvam 
>> wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > Thanks, good to know, in fact my requirement needs to merge multiple
>> > > > expressions, while current streaming expressions supports only two
>> > > > expression. Do you think we can expect that in future versions?
>> > > > On 07-Aug-2015 6:46 pm, "Joel Bernstein" 
>> wrote:
>> > > >
>> > > > > Hi,
>> > > > >
>> > > > > There is a new error handling framework in trunk (SOLR-7441) for
>> the
>> > > > > Streaming API, Streaming Expressions.
>> > > > >
>> > > > > So if you're purely in testing mode, it will be much easier to
>> work
>> > in
>> > > > > trunk then Solr 5.2.
>> > > > >
>> > > > > If you run into errors in trunk that are still confusing please
>> > > continue
>> > > > to
>> > > > > report them so we can get all the error messages covered.
>> > > > >
>> > > > > Thanks,
>> > > > >
>> > > > > Joel
>> > > > >
>> > > > >
>> > > > > Joel Bernstein
>> > > > > http://joelsolr.blogspot.com/
>> > > > >
>> > > > > On Fri, Aug 7, 2015 at 6:19 AM, Selvam 
>> > wrote:
>> > > > >
>> > > > > > Hi,
>> > > > > >
>> > > > > > Sorry, it is working now.
>> > > > > >
>> > > > > > curl --data-urlencode
>> > > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
>> > > > > > http://localhost:8983/solr/gettingstarted/stream
>> > > > > >
>> > > > > > I missed *'asc'* in sort :)
>> > > > > >
>> > > > > > Thanks for the help Shawn Heisey.
>> > > > > >
>> > > > > > On Fri, Aug 7, 2015 at 3:46 PM, Selvam 
>> > > wrote:
>> > > > > >
>> > > > > > > Hi,
>> > > > > > >
>> > > > > > > Thanks for your update, yes, I was missing the cloud mode, I
>> am
>> > new
>> > > > to
>> > > > > > the
>> > > > > > > world of Solr cloud. Now I have enabled a single node (with
>> two
>> > > > shards
>> > > > > &
>> > > > > > > replicas) that runs on 8983 port along with zookeeper running
>> on
>> > > 9983
>> > > > > > port.
>> > > > > > > When I run,
>> > > > > > >
>> > > > > > >  curl --data-urlencode
>> > > > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
>> > > > > > > http://localhost:8983/solr/gettingstarted/stream
>> > > > > > >
>> > > > > > > Again, I get
>> > > > > > >
>> > > > > > > "Unable to construct instance of
>> > > > > > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
>> > > > > > > .
>> > > > > > > .
>> > > > > > >
>> > > > > > > Caused by: java.lang.reflect.InvocationTargetException
>> > > > > > > .
>> > > > > > > .
>> > > > > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
>> > > > > > >
>> > > > > > > I tried different port, 9983 as well, which returns "Empty
>> reply
>> > > from
>> > > > > > > server". I think I miss some obvious configuration.
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey <
>> > apa...@elyograg.org>
>> > > > > > wrote:
>> > > > > > >
>> > > > > > >> On 8/7/2015 1:37 AM, Selvam wrote:
>> > > > > > >> >
>> > > > > >
>> > >
>> https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
>> > > > > > >> >
>> > > > > > >> > I tried this from my linux terminal,
>> > > > > > >> > 1)   curl --data-urlencode
>> > > > > > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
>> > > > > > >> > http://localhost:8983/solr/gettingstarted/stream
>> > > > > > >> >
>> > > > > > >> > Threw zkHost error. Then tried with,
>> > > > > > >> >
>> > > > > > >> > 2)   curl --data-urlencode
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
>> > > > > > >> > http://localhost:8983/solr/gettingstarted/stream
>> > > > > > >> >
>> > > > > > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException:
>> > 1\n\tat
>> > > > > > >> >
>> > > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
>> > > > > > >>
>> > > > > > >> The docum

Re: Streaming API running a simple query

2015-08-10 Thread Selvam
Hi,

Thanks, that seems to be working!

On Sat, Aug 8, 2015 at 9:28 PM, Joel Bernstein  wrote:

> This sounds doable using nested merge functions like this:
>
> merge(search(...),
>merge(search(...), search(),...), ...)
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Sat, Aug 8, 2015 at 8:08 AM, Selvam  wrote:
>
> > Hi,
> >
> > I needed to run a multiple subqueries each with its own limit of rows.
> >
> > For eg: to get 30 users from country India with age greater than 30 and
> 50
> > users from England who are all male.
> >
> > Thanks again.
> > On 08-Aug-2015 5:30 pm, "Joel Bernstein"  wrote:
> >
> > > Can you describe your use case?
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > > On Sat, Aug 8, 2015 at 7:36 AM, Selvam  wrote:
> > >
> > > > Hi,
> > > >
> > > > Thanks, good to know, in fact my requirement needs to merge multiple
> > > > expressions, while current streaming expressions supports only two
> > > > expression. Do you think we can expect that in future versions?
> > > > On 07-Aug-2015 6:46 pm, "Joel Bernstein"  wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > There is a new error handling framework in trunk (SOLR-7441) for
> the
> > > > > Streaming API, Streaming Expressions.
> > > > >
> > > > > So if you're purely in testing mode, it will be much easier to work
> > in
> > > > > trunk then Solr 5.2.
> > > > >
> > > > > If you run into errors in trunk that are still confusing please
> > > continue
> > > > to
> > > > > report them so we can get all the error messages covered.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Joel
> > > > >
> > > > >
> > > > > Joel Bernstein
> > > > > http://joelsolr.blogspot.com/
> > > > >
> > > > > On Fri, Aug 7, 2015 at 6:19 AM, Selvam 
> > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Sorry, it is working now.
> > > > > >
> > > > > > curl --data-urlencode
> > > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> > > > > > http://localhost:8983/solr/gettingstarted/stream
> > > > > >
> > > > > > I missed *'asc'* in sort :)
> > > > > >
> > > > > > Thanks for the help Shawn Heisey.
> > > > > >
> > > > > > On Fri, Aug 7, 2015 at 3:46 PM, Selvam 
> > > wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > Thanks for your update, yes, I was missing the cloud mode, I am
> > new
> > > > to
> > > > > > the
> > > > > > > world of Solr cloud. Now I have enabled a single node (with two
> > > > shards
> > > > > &
> > > > > > > replicas) that runs on 8983 port along with zookeeper running
> on
> > > 9983
> > > > > > port.
> > > > > > > When I run,
> > > > > > >
> > > > > > >  curl --data-urlencode
> > > > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > > > > http://localhost:8983/solr/gettingstarted/stream
> > > > > > >
> > > > > > > Again, I get
> > > > > > >
> > > > > > > "Unable to construct instance of
> > > > > > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > > > > > > .
> > > > > > > .
> > > > > > >
> > > > > > > Caused by: java.lang.reflect.InvocationTargetException
> > > > > > > .
> > > > > > > .
> > > > > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> > > > > > >
> > > > > > > I tried different port, 9983 as well, which returns "Empty
> reply
> > > from
> > > > > > > server". I think I miss some obvious configuration.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey <
> > apa...@elyograg.org>
> > > > > > wrote:
> > > > > > >
> > > > > > >> On 8/7/2015 1:37 AM, Selvam wrote:
> > > > > > >> >
> > > > > >
> > > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> > > > > > >> >
> > > > > > >> > I tried this from my linux terminal,
> > > > > > >> > 1)   curl --data-urlencode
> > > > > > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > > > >> >
> > > > > > >> > Threw zkHost error. Then tried with,
> > > > > > >> >
> > > > > > >> > 2)   curl --data-urlencode
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > > > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > > > >> >
> > > > > > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException:
> > 1\n\tat
> > > > > > >> >
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> > > > > > >>
> > > > > > >> The documentation page you linked seems to indicate that this
> > is a
> > > > > > >> feature that only works in SolrCloud.  Your inclusion of
> > > > > > >> "localhost:8983" as the zkHost suggests that either you are
> NOT
> > > > > running
> > > > > > >> in cloud mode, or that you do not understand what zkHost
> means.
> > > > > > >>
> > > > > > >> Zookeeper runs on a different port than Solr.  898

Re: Streaming API running a simple query

2015-08-08 Thread Joel Bernstein
This sounds doable using nested merge functions like this:

merge(search(...),
   merge(search(...), search(),...), ...)

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

On Sat, Aug 8, 2015 at 8:08 AM, Selvam  wrote:

> Hi,
>
> I needed to run a multiple subqueries each with its own limit of rows.
>
> For eg: to get 30 users from country India with age greater than 30 and 50
> users from England who are all male.
>
> Thanks again.
> On 08-Aug-2015 5:30 pm, "Joel Bernstein"  wrote:
>
> > Can you describe your use case?
> >
> > Joel Bernstein
> > http://joelsolr.blogspot.com/
> >
> > On Sat, Aug 8, 2015 at 7:36 AM, Selvam  wrote:
> >
> > > Hi,
> > >
> > > Thanks, good to know, in fact my requirement needs to merge multiple
> > > expressions, while current streaming expressions supports only two
> > > expression. Do you think we can expect that in future versions?
> > > On 07-Aug-2015 6:46 pm, "Joel Bernstein"  wrote:
> > >
> > > > Hi,
> > > >
> > > > There is a new error handling framework in trunk (SOLR-7441) for the
> > > > Streaming API, Streaming Expressions.
> > > >
> > > > So if you're purely in testing mode, it will be much easier to work
> in
> > > > trunk then Solr 5.2.
> > > >
> > > > If you run into errors in trunk that are still confusing please
> > continue
> > > to
> > > > report them so we can get all the error messages covered.
> > > >
> > > > Thanks,
> > > >
> > > > Joel
> > > >
> > > >
> > > > Joel Bernstein
> > > > http://joelsolr.blogspot.com/
> > > >
> > > > On Fri, Aug 7, 2015 at 6:19 AM, Selvam 
> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Sorry, it is working now.
> > > > >
> > > > > curl --data-urlencode
> > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> > > > > http://localhost:8983/solr/gettingstarted/stream
> > > > >
> > > > > I missed *'asc'* in sort :)
> > > > >
> > > > > Thanks for the help Shawn Heisey.
> > > > >
> > > > > On Fri, Aug 7, 2015 at 3:46 PM, Selvam 
> > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > Thanks for your update, yes, I was missing the cloud mode, I am
> new
> > > to
> > > > > the
> > > > > > world of Solr cloud. Now I have enabled a single node (with two
> > > shards
> > > > &
> > > > > > replicas) that runs on 8983 port along with zookeeper running on
> > 9983
> > > > > port.
> > > > > > When I run,
> > > > > >
> > > > > >  curl --data-urlencode
> > > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > > > http://localhost:8983/solr/gettingstarted/stream
> > > > > >
> > > > > > Again, I get
> > > > > >
> > > > > > "Unable to construct instance of
> > > > > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > > > > > .
> > > > > > .
> > > > > >
> > > > > > Caused by: java.lang.reflect.InvocationTargetException
> > > > > > .
> > > > > > .
> > > > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> > > > > >
> > > > > > I tried different port, 9983 as well, which returns "Empty reply
> > from
> > > > > > server". I think I miss some obvious configuration.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey <
> apa...@elyograg.org>
> > > > > wrote:
> > > > > >
> > > > > >> On 8/7/2015 1:37 AM, Selvam wrote:
> > > > > >> >
> > > > >
> > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> > > > > >> >
> > > > > >> > I tried this from my linux terminal,
> > > > > >> > 1)   curl --data-urlencode
> > > > > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > > >> >
> > > > > >> > Threw zkHost error. Then tried with,
> > > > > >> >
> > > > > >> > 2)   curl --data-urlencode
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > > >> >
> > > > > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException:
> 1\n\tat
> > > > > >> >
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> > > > > >>
> > > > > >> The documentation page you linked seems to indicate that this
> is a
> > > > > >> feature that only works in SolrCloud.  Your inclusion of
> > > > > >> "localhost:8983" as the zkHost suggests that either you are NOT
> > > > running
> > > > > >> in cloud mode, or that you do not understand what zkHost means.
> > > > > >>
> > > > > >> Zookeeper runs on a different port than Solr.  8983 is Solr's
> > port.
> > > > If
> > > > > >> you are running a 5.x cloud with the embedded zookeeper, it is
> > most
> > > > > >> likely running on port 9983.  If you are running in cloud mode
> > with
> > > a
> > > > > >> properly configured external zookeeper, then your zkHost
> parameter
> > > > will
> > > > > >> probably have three hosts in it with port 2181.
> > > > > >>
> > > > > >> Thanks,
> > > > > >> Shaw

Re: Streaming API running a simple query

2015-08-08 Thread Selvam
Hi,

I needed to run a multiple subqueries each with its own limit of rows.

For eg: to get 30 users from country India with age greater than 30 and 50
users from England who are all male.

Thanks again.
On 08-Aug-2015 5:30 pm, "Joel Bernstein"  wrote:

> Can you describe your use case?
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Sat, Aug 8, 2015 at 7:36 AM, Selvam  wrote:
>
> > Hi,
> >
> > Thanks, good to know, in fact my requirement needs to merge multiple
> > expressions, while current streaming expressions supports only two
> > expression. Do you think we can expect that in future versions?
> > On 07-Aug-2015 6:46 pm, "Joel Bernstein"  wrote:
> >
> > > Hi,
> > >
> > > There is a new error handling framework in trunk (SOLR-7441) for the
> > > Streaming API, Streaming Expressions.
> > >
> > > So if you're purely in testing mode, it will be much easier to work in
> > > trunk then Solr 5.2.
> > >
> > > If you run into errors in trunk that are still confusing please
> continue
> > to
> > > report them so we can get all the error messages covered.
> > >
> > > Thanks,
> > >
> > > Joel
> > >
> > >
> > > Joel Bernstein
> > > http://joelsolr.blogspot.com/
> > >
> > > On Fri, Aug 7, 2015 at 6:19 AM, Selvam  wrote:
> > >
> > > > Hi,
> > > >
> > > > Sorry, it is working now.
> > > >
> > > > curl --data-urlencode
> > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> > > > http://localhost:8983/solr/gettingstarted/stream
> > > >
> > > > I missed *'asc'* in sort :)
> > > >
> > > > Thanks for the help Shawn Heisey.
> > > >
> > > > On Fri, Aug 7, 2015 at 3:46 PM, Selvam 
> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Thanks for your update, yes, I was missing the cloud mode, I am new
> > to
> > > > the
> > > > > world of Solr cloud. Now I have enabled a single node (with two
> > shards
> > > &
> > > > > replicas) that runs on 8983 port along with zookeeper running on
> 9983
> > > > port.
> > > > > When I run,
> > > > >
> > > > >  curl --data-urlencode
> > > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > > http://localhost:8983/solr/gettingstarted/stream
> > > > >
> > > > > Again, I get
> > > > >
> > > > > "Unable to construct instance of
> > > > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > > > > .
> > > > > .
> > > > >
> > > > > Caused by: java.lang.reflect.InvocationTargetException
> > > > > .
> > > > > .
> > > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> > > > >
> > > > > I tried different port, 9983 as well, which returns "Empty reply
> from
> > > > > server". I think I miss some obvious configuration.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey 
> > > > wrote:
> > > > >
> > > > >> On 8/7/2015 1:37 AM, Selvam wrote:
> > > > >> >
> > > >
> https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> > > > >> >
> > > > >> > I tried this from my linux terminal,
> > > > >> > 1)   curl --data-urlencode
> > > > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > >> >
> > > > >> > Threw zkHost error. Then tried with,
> > > > >> >
> > > > >> > 2)   curl --data-urlencode
> > > > >> >
> > > > >>
> > > >
> > >
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > > >> >
> > > > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> > > > >>
> > > > >> The documentation page you linked seems to indicate that this is a
> > > > >> feature that only works in SolrCloud.  Your inclusion of
> > > > >> "localhost:8983" as the zkHost suggests that either you are NOT
> > > running
> > > > >> in cloud mode, or that you do not understand what zkHost means.
> > > > >>
> > > > >> Zookeeper runs on a different port than Solr.  8983 is Solr's
> port.
> > > If
> > > > >> you are running a 5.x cloud with the embedded zookeeper, it is
> most
> > > > >> likely running on port 9983.  If you are running in cloud mode
> with
> > a
> > > > >> properly configured external zookeeper, then your zkHost parameter
> > > will
> > > > >> probably have three hosts in it with port 2181.
> > > > >>
> > > > >> Thanks,
> > > > >> Shawn
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > Regards,
> > > > > Selvam
> > > > > KnackForge 
> > > > > Acquia Service Partner
> > > > > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > > > > Ambattur, Chennai,
> > > > > Tamil Nadu, India.
> > > > > PIN - 600 053.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Selvam
> > > > KnackForge 
> > > > Acquia Service Partner
> > > > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > > > Ambattur, Chennai,
> > > > Tamil Nadu, Indi

Re: Streaming API running a simple query

2015-08-08 Thread Joel Bernstein
Can you describe your use case?

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

On Sat, Aug 8, 2015 at 7:36 AM, Selvam  wrote:

> Hi,
>
> Thanks, good to know, in fact my requirement needs to merge multiple
> expressions, while current streaming expressions supports only two
> expression. Do you think we can expect that in future versions?
> On 07-Aug-2015 6:46 pm, "Joel Bernstein"  wrote:
>
> > Hi,
> >
> > There is a new error handling framework in trunk (SOLR-7441) for the
> > Streaming API, Streaming Expressions.
> >
> > So if you're purely in testing mode, it will be much easier to work in
> > trunk then Solr 5.2.
> >
> > If you run into errors in trunk that are still confusing please continue
> to
> > report them so we can get all the error messages covered.
> >
> > Thanks,
> >
> > Joel
> >
> >
> > Joel Bernstein
> > http://joelsolr.blogspot.com/
> >
> > On Fri, Aug 7, 2015 at 6:19 AM, Selvam  wrote:
> >
> > > Hi,
> > >
> > > Sorry, it is working now.
> > >
> > > curl --data-urlencode
> > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> > > http://localhost:8983/solr/gettingstarted/stream
> > >
> > > I missed *'asc'* in sort :)
> > >
> > > Thanks for the help Shawn Heisey.
> > >
> > > On Fri, Aug 7, 2015 at 3:46 PM, Selvam  wrote:
> > >
> > > > Hi,
> > > >
> > > > Thanks for your update, yes, I was missing the cloud mode, I am new
> to
> > > the
> > > > world of Solr cloud. Now I have enabled a single node (with two
> shards
> > &
> > > > replicas) that runs on 8983 port along with zookeeper running on 9983
> > > port.
> > > > When I run,
> > > >
> > > >  curl --data-urlencode
> > > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > > http://localhost:8983/solr/gettingstarted/stream
> > > >
> > > > Again, I get
> > > >
> > > > "Unable to construct instance of
> > > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > > > .
> > > > .
> > > >
> > > > Caused by: java.lang.reflect.InvocationTargetException
> > > > .
> > > > .
> > > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> > > >
> > > > I tried different port, 9983 as well, which returns "Empty reply from
> > > > server". I think I miss some obvious configuration.
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey 
> > > wrote:
> > > >
> > > >> On 8/7/2015 1:37 AM, Selvam wrote:
> > > >> >
> > > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> > > >> >
> > > >> > I tried this from my linux terminal,
> > > >> > 1)   curl --data-urlencode
> > > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > >> >
> > > >> > Threw zkHost error. Then tried with,
> > > >> >
> > > >> > 2)   curl --data-urlencode
> > > >> >
> > > >>
> > >
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > > >> > http://localhost:8983/solr/gettingstarted/stream
> > > >> >
> > > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> > > >> >
> > > >>
> > >
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> > > >>
> > > >> The documentation page you linked seems to indicate that this is a
> > > >> feature that only works in SolrCloud.  Your inclusion of
> > > >> "localhost:8983" as the zkHost suggests that either you are NOT
> > running
> > > >> in cloud mode, or that you do not understand what zkHost means.
> > > >>
> > > >> Zookeeper runs on a different port than Solr.  8983 is Solr's port.
> > If
> > > >> you are running a 5.x cloud with the embedded zookeeper, it is most
> > > >> likely running on port 9983.  If you are running in cloud mode with
> a
> > > >> properly configured external zookeeper, then your zkHost parameter
> > will
> > > >> probably have three hosts in it with port 2181.
> > > >>
> > > >> Thanks,
> > > >> Shawn
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Selvam
> > > > KnackForge 
> > > > Acquia Service Partner
> > > > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > > > Ambattur, Chennai,
> > > > Tamil Nadu, India.
> > > > PIN - 600 053.
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Selvam
> > > KnackForge 
> > > Acquia Service Partner
> > > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > > Ambattur, Chennai,
> > > Tamil Nadu, India.
> > > PIN - 600 053.
> > >
> >
>


Re: Streaming API running a simple query

2015-08-08 Thread Selvam
Hi,

Thanks, good to know, in fact my requirement needs to merge multiple
expressions, while current streaming expressions supports only two
expression. Do you think we can expect that in future versions?
On 07-Aug-2015 6:46 pm, "Joel Bernstein"  wrote:

> Hi,
>
> There is a new error handling framework in trunk (SOLR-7441) for the
> Streaming API, Streaming Expressions.
>
> So if you're purely in testing mode, it will be much easier to work in
> trunk then Solr 5.2.
>
> If you run into errors in trunk that are still confusing please continue to
> report them so we can get all the error messages covered.
>
> Thanks,
>
> Joel
>
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Fri, Aug 7, 2015 at 6:19 AM, Selvam  wrote:
>
> > Hi,
> >
> > Sorry, it is working now.
> >
> > curl --data-urlencode
> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> > http://localhost:8983/solr/gettingstarted/stream
> >
> > I missed *'asc'* in sort :)
> >
> > Thanks for the help Shawn Heisey.
> >
> > On Fri, Aug 7, 2015 at 3:46 PM, Selvam  wrote:
> >
> > > Hi,
> > >
> > > Thanks for your update, yes, I was missing the cloud mode, I am new to
> > the
> > > world of Solr cloud. Now I have enabled a single node (with two shards
> &
> > > replicas) that runs on 8983 port along with zookeeper running on 9983
> > port.
> > > When I run,
> > >
> > >  curl --data-urlencode
> > > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > > http://localhost:8983/solr/gettingstarted/stream
> > >
> > > Again, I get
> > >
> > > "Unable to construct instance of
> > > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > > .
> > > .
> > >
> > > Caused by: java.lang.reflect.InvocationTargetException
> > > .
> > > .
> > > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> > >
> > > I tried different port, 9983 as well, which returns "Empty reply from
> > > server". I think I miss some obvious configuration.
> > >
> > >
> > >
> > >
> > > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey 
> > wrote:
> > >
> > >> On 8/7/2015 1:37 AM, Selvam wrote:
> > >> >
> > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> > >> >
> > >> > I tried this from my linux terminal,
> > >> > 1)   curl --data-urlencode
> > >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > >> > http://localhost:8983/solr/gettingstarted/stream
> > >> >
> > >> > Threw zkHost error. Then tried with,
> > >> >
> > >> > 2)   curl --data-urlencode
> > >> >
> > >>
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > >> > http://localhost:8983/solr/gettingstarted/stream
> > >> >
> > >> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> > >> >
> > >>
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> > >>
> > >> The documentation page you linked seems to indicate that this is a
> > >> feature that only works in SolrCloud.  Your inclusion of
> > >> "localhost:8983" as the zkHost suggests that either you are NOT
> running
> > >> in cloud mode, or that you do not understand what zkHost means.
> > >>
> > >> Zookeeper runs on a different port than Solr.  8983 is Solr's port.
> If
> > >> you are running a 5.x cloud with the embedded zookeeper, it is most
> > >> likely running on port 9983.  If you are running in cloud mode with a
> > >> properly configured external zookeeper, then your zkHost parameter
> will
> > >> probably have three hosts in it with port 2181.
> > >>
> > >> Thanks,
> > >> Shawn
> > >>
> > >>
> > >
> > >
> > > --
> > > Regards,
> > > Selvam
> > > KnackForge 
> > > Acquia Service Partner
> > > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > > Ambattur, Chennai,
> > > Tamil Nadu, India.
> > > PIN - 600 053.
> > >
> >
> >
> >
> > --
> > Regards,
> > Selvam
> > KnackForge 
> > Acquia Service Partner
> > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > Ambattur, Chennai,
> > Tamil Nadu, India.
> > PIN - 600 053.
> >
>


Re: Streaming API running a simple query

2015-08-07 Thread Joel Bernstein
Hi,

There is a new error handling framework in trunk (SOLR-7441) for the
Streaming API, Streaming Expressions.

So if you're purely in testing mode, it will be much easier to work in
trunk then Solr 5.2.

If you run into errors in trunk that are still confusing please continue to
report them so we can get all the error messages covered.

Thanks,

Joel


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

On Fri, Aug 7, 2015 at 6:19 AM, Selvam  wrote:

> Hi,
>
> Sorry, it is working now.
>
> curl --data-urlencode
> 'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
> http://localhost:8983/solr/gettingstarted/stream
>
> I missed *'asc'* in sort :)
>
> Thanks for the help Shawn Heisey.
>
> On Fri, Aug 7, 2015 at 3:46 PM, Selvam  wrote:
>
> > Hi,
> >
> > Thanks for your update, yes, I was missing the cloud mode, I am new to
> the
> > world of Solr cloud. Now I have enabled a single node (with two shards &
> > replicas) that runs on 8983 port along with zookeeper running on 9983
> port.
> > When I run,
> >
> >  curl --data-urlencode
> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > http://localhost:8983/solr/gettingstarted/stream
> >
> > Again, I get
> >
> > "Unable to construct instance of
> > org.apache.solr.client.solrj.io.stream.CloudSolrStream
> > .
> > .
> >
> > Caused by: java.lang.reflect.InvocationTargetException
> > .
> > .
> > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
> >
> > I tried different port, 9983 as well, which returns "Empty reply from
> > server". I think I miss some obvious configuration.
> >
> >
> >
> >
> > On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey 
> wrote:
> >
> >> On 8/7/2015 1:37 AM, Selvam wrote:
> >> >
> https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> >> >
> >> > I tried this from my linux terminal,
> >> > 1)   curl --data-urlencode
> >> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> >> > http://localhost:8983/solr/gettingstarted/stream
> >> >
> >> > Threw zkHost error. Then tried with,
> >> >
> >> > 2)   curl --data-urlencode
> >> >
> >>
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> >> > http://localhost:8983/solr/gettingstarted/stream
> >> >
> >> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> >> >
> >>
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
> >>
> >> The documentation page you linked seems to indicate that this is a
> >> feature that only works in SolrCloud.  Your inclusion of
> >> "localhost:8983" as the zkHost suggests that either you are NOT running
> >> in cloud mode, or that you do not understand what zkHost means.
> >>
> >> Zookeeper runs on a different port than Solr.  8983 is Solr's port.  If
> >> you are running a 5.x cloud with the embedded zookeeper, it is most
> >> likely running on port 9983.  If you are running in cloud mode with a
> >> properly configured external zookeeper, then your zkHost parameter will
> >> probably have three hosts in it with port 2181.
> >>
> >> Thanks,
> >> Shawn
> >>
> >>
> >
> >
> > --
> > Regards,
> > Selvam
> > KnackForge 
> > Acquia Service Partner
> > No. 1, 12th Line, K.K. Road, Venkatapuram,
> > Ambattur, Chennai,
> > Tamil Nadu, India.
> > PIN - 600 053.
> >
>
>
>
> --
> Regards,
> Selvam
> KnackForge 
> Acquia Service Partner
> No. 1, 12th Line, K.K. Road, Venkatapuram,
> Ambattur, Chennai,
> Tamil Nadu, India.
> PIN - 600 053.
>


Re: Streaming API running a simple query

2015-08-07 Thread Selvam
Hi,

Sorry, it is working now.

curl --data-urlencode
'stream=search(gettingstarted,q="*:*",fl="id",sort="id asc")'
http://localhost:8983/solr/gettingstarted/stream

I missed *'asc'* in sort :)

Thanks for the help Shawn Heisey.

On Fri, Aug 7, 2015 at 3:46 PM, Selvam  wrote:

> Hi,
>
> Thanks for your update, yes, I was missing the cloud mode, I am new to the
> world of Solr cloud. Now I have enabled a single node (with two shards &
> replicas) that runs on 8983 port along with zookeeper running on 9983 port.
> When I run,
>
>  curl --data-urlencode
> 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> http://localhost:8983/solr/gettingstarted/stream
>
> Again, I get
>
> "Unable to construct instance of
> org.apache.solr.client.solrj.io.stream.CloudSolrStream
> .
> .
>
> Caused by: java.lang.reflect.InvocationTargetException
> .
> .
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"
>
> I tried different port, 9983 as well, which returns "Empty reply from
> server". I think I miss some obvious configuration.
>
>
>
>
> On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey  wrote:
>
>> On 8/7/2015 1:37 AM, Selvam wrote:
>> > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
>> >
>> > I tried this from my linux terminal,
>> > 1)   curl --data-urlencode
>> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
>> > http://localhost:8983/solr/gettingstarted/stream
>> >
>> > Threw zkHost error. Then tried with,
>> >
>> > 2)   curl --data-urlencode
>> >
>> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
>> > http://localhost:8983/solr/gettingstarted/stream
>> >
>> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
>> >
>> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
>>
>> The documentation page you linked seems to indicate that this is a
>> feature that only works in SolrCloud.  Your inclusion of
>> "localhost:8983" as the zkHost suggests that either you are NOT running
>> in cloud mode, or that you do not understand what zkHost means.
>>
>> Zookeeper runs on a different port than Solr.  8983 is Solr's port.  If
>> you are running a 5.x cloud with the embedded zookeeper, it is most
>> likely running on port 9983.  If you are running in cloud mode with a
>> properly configured external zookeeper, then your zkHost parameter will
>> probably have three hosts in it with port 2181.
>>
>> Thanks,
>> Shawn
>>
>>
>
>
> --
> Regards,
> Selvam
> KnackForge 
> Acquia Service Partner
> No. 1, 12th Line, K.K. Road, Venkatapuram,
> Ambattur, Chennai,
> Tamil Nadu, India.
> PIN - 600 053.
>



-- 
Regards,
Selvam
KnackForge 
Acquia Service Partner
No. 1, 12th Line, K.K. Road, Venkatapuram,
Ambattur, Chennai,
Tamil Nadu, India.
PIN - 600 053.


Re: Streaming API running a simple query

2015-08-07 Thread Selvam
Hi,

Thanks for your update, yes, I was missing the cloud mode, I am new to the
world of Solr cloud. Now I have enabled a single node (with two shards &
replicas) that runs on 8983 port along with zookeeper running on 9983 port.
When I run,

 curl --data-urlencode
'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
http://localhost:8983/solr/gettingstarted/stream

Again, I get

"Unable to construct instance of
org.apache.solr.client.solrj.io.stream.CloudSolrStream
.
.

Caused by: java.lang.reflect.InvocationTargetException
.
.
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1"

I tried different port, 9983 as well, which returns "Empty reply from
server". I think I miss some obvious configuration.




On Fri, Aug 7, 2015 at 2:04 PM, Shawn Heisey  wrote:

> On 8/7/2015 1:37 AM, Selvam wrote:
> > https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> >
> > I tried this from my linux terminal,
> > 1)   curl --data-urlencode
> > 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> > http://localhost:8983/solr/gettingstarted/stream
> >
> > Threw zkHost error. Then tried with,
> >
> > 2)   curl --data-urlencode
> >
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> > http://localhost:8983/solr/gettingstarted/stream
> >
> > It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> >
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"
>
> The documentation page you linked seems to indicate that this is a
> feature that only works in SolrCloud.  Your inclusion of
> "localhost:8983" as the zkHost suggests that either you are NOT running
> in cloud mode, or that you do not understand what zkHost means.
>
> Zookeeper runs on a different port than Solr.  8983 is Solr's port.  If
> you are running a 5.x cloud with the embedded zookeeper, it is most
> likely running on port 9983.  If you are running in cloud mode with a
> properly configured external zookeeper, then your zkHost parameter will
> probably have three hosts in it with port 2181.
>
> Thanks,
> Shawn
>
>


-- 
Regards,
Selvam
KnackForge 
Acquia Service Partner
No. 1, 12th Line, K.K. Road, Venkatapuram,
Ambattur, Chennai,
Tamil Nadu, India.
PIN - 600 053.


Re: Streaming API running a simple query

2015-08-07 Thread Shawn Heisey
On 8/7/2015 1:37 AM, Selvam wrote:
> https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions
> 
> I tried this from my linux terminal,
> 1)   curl --data-urlencode
> 'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
> http://localhost:8983/solr/gettingstarted/stream
> 
> Threw zkHost error. Then tried with,
> 
> 2)   curl --data-urlencode
> 'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
> http://localhost:8983/solr/gettingstarted/stream
> 
> It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"

The documentation page you linked seems to indicate that this is a
feature that only works in SolrCloud.  Your inclusion of
"localhost:8983" as the zkHost suggests that either you are NOT running
in cloud mode, or that you do not understand what zkHost means.

Zookeeper runs on a different port than Solr.  8983 is Solr's port.  If
you are running a 5.x cloud with the embedded zookeeper, it is most
likely running on port 9983.  If you are running in cloud mode with a
properly configured external zookeeper, then your zkHost parameter will
probably have three hosts in it with port 2181.

Thanks,
Shawn



Streaming API running a simple query

2015-08-07 Thread Selvam
Hi All,

I am trying to use Streaming API in Solr 5.2.

For eg as per
https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions

I tried this from my linux terminal,
1)   curl --data-urlencode
'stream=search(gettingstarted,q="*:*",fl="id",sort="id")'
http://localhost:8983/solr/gettingstarted/stream

Threw zkHost error. Then tried with,

2)   curl --data-urlencode
'stream=search(gettingstarted,zkHost="localhost:8983",q="*:*",fl="id",sort="id")'
http://localhost:8983/solr/gettingstarted/stream

It throws me "java.lang.ArrayIndexOutOfBoundsException: 1\n\tat
org.apache.solr.client.solrj.io.stream.CloudSolrStream.parseComp(CloudSolrStream.java:260)"

Kindly let me know if you have worked with Streaming API and a way to fix
this issue.

-- 
Regards,
Selvam
KnackForge 


Re: A simple query?

2011-10-12 Thread alexw
Thanks Hoss and iorixxx.

Yes I probably did oversimplify the use case, which is fairly complicated to
explain. I think I might have found a workaround for the issue and I am
testing the performance of it.

Thanks again for your help!




--
View this message in context: 
http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3416863.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: A simple query?

2011-10-11 Thread Chris Hostetter
: This may seem to be an easy one but I have been struggling to get it
: working. To simplify things, let's say I have a field that can contain any
: combination of the 26 alphabetic letters, space delimited:

I suspect you may have "over simplified" your problem in a way that may 
make some specific solutions for your real use case non-obvious becaues of 
the way you've simplified it.  

the more you can tell us about your *real* use case, the more likeley 
people can give you *real* answers.

That said...

: 1. Any doc that contains exactly the 4 letters a b y z (sequence not
: important)
: 2. Any docs that contains only a subset of the 4 letters a b y z (sequence
: not important)
: 
: Note if a doc contains any letters other than the 4 letters a b y z will not
: qualify. So in this case, only the first doc should be returned.

...since the number of values is finite (and small) i would index your 
data as a simple multivalued StrField (or TextField using a whitespace 
tokenizer) and then write your queries such that you deliberately exclude 
documents matching the inverse set of your input.

ie: query = "a b y z" ...

 q = +(a b y z) -(c d e f g h i j k l m n o b q r s t u v w x)

...or leverage filter cache...

 q = a b y z & fq = -c & fq = -d & fq = -e & fq = -f & 



-Hoss


Re: A simple query?

2011-10-05 Thread Ahmet Arslan
Your use-case is pretty unique. One solutions might be to use MemoryIndex which 
is designed for "Prospective search". 

http://lucene.apache.org/java/2_4_0/api/contrib-memory/org/apache/lucene/index/memory/MemoryIndex.html

Your documents will be your stored "huge numbers of queries". Your user entered 
search term (a b y z)  will be tested against those stored queries.

In your example,

Your document will be a b y z and your stored queries will be

q1 = a b
q2 = b c
q3 = x y z

If you use AND operator, only q1/doc1 will be a hit.

--- On Wed, 10/5/11, alexw  wrote:

> From: alexw 
> Subject: Re: A simple query?
> To: solr-user@lucene.apache.org
> Date: Wednesday, October 5, 2011, 3:15 PM
> Thanks but, unfortunately that will
> not solve the problem since it will bring
> back both the first and second doc. Besides, the query
> terms is: a b y z,
> not just: a b
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3396297.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
> 


Re: A simple query?

2011-10-05 Thread alexw
Thanks but, unfortunately that will not solve the problem since it will bring
back both the first and second doc. Besides, the query terms is: a b y z,
not just: a b

--
View this message in context: 
http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3396297.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: A simple query?

2011-10-04 Thread tamanjit.bin...@yahoo.co.in
Hi,
Set your default operator to OR i.e.

 in schema.xml

Also keep your fieldType=text i.e.



As you would want whitespace tokenization and try your query with () i.e.

/select/?q=myfields:(a b)&version=2.2&start=0&rows=2&indent=on

This hopefully should solve your problem.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3395735.html
Sent from the Solr - User mailing list archive at Nabble.com.


A simple query?

2011-10-04 Thread alexw
Hi all,

This may seem to be an easy one but I have been struggling to get it
working. To simplify things, let's say I have a field that can contain any
combination of the 26 alphabetic letters, space delimited:


a b


b c


x y z


The search term is a list of user specified letters, for exampe: a b y z

I would like only the following docs to be returned:

1. Any doc that contains exactly the 4 letters a b y z (sequence not
important)
2. Any docs that contains only a subset of the 4 letters a b y z (sequence
not important)

Note if a doc contains any letters other than the 4 letters a b y z will not
qualify. So in this case, only the first doc should be returned.

Can some one shed some light here and let me know how to get this working,
specifically:

1. What should the field type be (text, text_ws, string...)?
2. How does the query look like?

Thanks in advance!







--
View this message in context: 
http://lucene.472066.n3.nabble.com/A-simple-query-tp3395465p3395465.html
Sent from the Solr - User mailing list archive at Nabble.com.