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 Zheng Lin Edwin Yeo <ed...@gmail.com> on 2015/03/27 09:38:57 UTC

Unable to perform search query after changing uniqueKey

Hi everyone,

I've changed my uniqueKey to another name, instead of using id, on the
schema.xml.

However, after I have done the indexing (the indexing is successful), I'm
not able to perform a search query on it. I gives the error
java.lang.NullPointerException.

Is there other place which I need to configure, besides changing the
uniqueKey field in scheam.xml?

Regards,
Edwin

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Steve,

Thanks for the link and the information.

Regards,
Edwin


On 1 April 2015 at 23:17, Erick Erickson <er...@gmail.com> wrote:

> Steve:
>
> Totally agree. Even if you _do_ correctly escape the URL though,
> there's no guarantee that Solr will "do the right thing" with field
> names with spaces. Plus endless chances for you to get it wrong when
> constructing the URL....
>
> Best,
> Erick
>
> On Wed, Apr 1, 2015 at 1:01 AM, steve <sc...@hotmail.com> wrote:
> > Gently walking into rough waters here, but if you use any API with GET,
> you're sending a URI which must be properly encoded. This has nothing to do
> with with the programming language that generates key and store pairs on
> the browser or the one(s) used on the server. Lots and lots of good folks
> have tripped over this one.http://www.w3schools.com/tags/ref_urlencode.asp
> > Play hard, but play safe!
> >
> >> Date: Wed, 1 Apr 2015 13:58:55 +0800
> >> Subject: Re: Unable to perform search query after changing uniqueKey
> >> From: edwinyeozl@gmail.com
> >> To: solr-user@lucene.apache.org
> >>
> >> Thanks Erick.
> >>
> >> Yes, it is able to work correct if I do not use spaces for the field
> names,
> >> especially for the uniqueKey.
> >>
> >> Regards,
> >> Edwin
> >>
> >>
> >> On 31 March 2015 at 13:58, Erick Erickson <er...@gmail.com>
> wrote:
> >>
> >> > I would never put spaces in my field names! Frankly I have no clue
> >> > what Solr does with that, but it can't be good. Solr explicitly
> >> > supports Java naming conventions, camel case, underscores and numbers.
> >> > Special symbols are frowned upon, I never use anything but upper case,
> >> > lower case and underscores. Actually, I don't use upper case either
> >> > but that's a personal preference. Other things might work, but only by
> >> > chance.
> >> >
> >> > Best,
> >> > Erick
> >> >
> >> > On Mon, Mar 30, 2015 at 8:59 PM, Zheng Lin Edwin Yeo
> >> > <ed...@gmail.com> wrote:
> >> > > Latest information that I've found for this is that the error only
> occurs
> >> > > for shard2.
> >> > >
> >> > > If I do a search for just shard1, those records that are assigned to
> >> > shard1
> >> > > will be able to be displayed. Only when I search for shard2 will the
> >> > > NullPointerException error occurs. Previously I was doing a search
> for
> >> > both
> >> > > shards.
> >> > >
> >> > > Is there any settings that I required to do for shard2 in order to
> solve
> >> > > this issue? Currently I have not made any changes to the shards
> since I
> >> > > created it using
> >> > >
> >> >
> http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1
> >> > >
> >> > >
> >> > > Regards,
> >> > > Edwin
> >> > >
> >> > > On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <
> edwinyeozl@gmail.com>
> >> > wrote:
> >> > >
> >> > >> Hi Erick,
> >> > >>
> >> > >> I've changed the uniqueKey from id to Item No.
> >> > >>
> >> > >> <uniqueKey>Item No</uniqueKey>
> >> > >>
> >> > >>
> >> > >> Below are my definitions for both the id and Item No.
> >> > >>
> >> > >> <field name="id" type="string" indexed="true" stored="true"
> >> > >> required="false" multiValued="false" />
> >> > >> <field name="Item No" type="text_general" indexed="true"
> stored="true"/>
> >> > >>
> >> > >> Regards,
> >> > >> Edwin
> >> > >>
> >> > >>
> >> > >> On 30 March 2015 at 23:05, Erick Erickson <erickerickson@gmail.com
> >
> >> > wrote:
> >> > >>
> >> > >>> Well, let's see the definition of your ID field, 'cause I'm
> puzzled.
> >> > >>>
> >> > >>> It's definitely A Bad Thing to have it be any kind of tokenized
> field
> >> > >>> though, but that's a shot in the dark.
> >> > >>>
> >> > >>> Best,
> >> > >>> Erick
> >> > >>>
> >> > >>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
> >> > >>> <ed...@gmail.com> wrote:
> >> > >>> > Hi Mostafa,
> >> > >>> >
> >> > >>> > Yes, I've defined all the fields in schema.xml. It is able to
> work on
> >> > >>> the
> >> > >>> > version without SolrCloud, but it is not working for the one
> with
> >> > >>> SolrCloud.
> >> > >>> > Both of them are using the same schema.xml.
> >> > >>> >
> >> > >>> > Regards,
> >> > >>> > Edwin
> >> > >>> >
> >> > >>> >
> >> > >>> >
> >> > >>> > On 30 March 2015 at 14:34, Mostafa Gomaa <
> mostafa.gomaa89@gmail.com>
> >> > >>> wrote:
> >> > >>> >
> >> > >>> >> Hi Zheng,
> >> > >>> >>
> >> > >>> >> It's possible that there's a problem with your schema.xml. Are
> all
> >> > >>> fields
> >> > >>> >> defined and have appropriate options enabled?
> >> > >>> >>
> >> > >>> >> Regards,
> >> > >>> >>
> >> > >>> >> Mostafa.
> >> > >>> >>
> >> > >>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
> >> > >>> edwinyeozl@gmail.com
> >> > >>> >> >
> >> > >>> >> wrote:
> >> > >>> >>
> >> > >>> >> > Hi Erick,
> >> > >>> >> >
> >> > >>> >> > I've tried that, and removed the data directory from both the
> >> > >>> shards. But
> >> > >>> >> > the same problem still occurs, so we probably can rule out
> the
> >> > >>> "memory"
> >> > >>> >> > issue.
> >> > >>> >> >
> >> > >>> >> > Regards,
> >> > >>> >> > Edwin
> >> > >>> >> >
> >> > >>> >> > On 30 March 2015 at 12:39, Erick Erickson <
> >> > erickerickson@gmail.com>
> >> > >>> >> wrote:
> >> > >>> >> >
> >> > >>> >> > > I meant shut down Solr and physically remove the entire
> data
> >> > >>> >> > > directory. Not saying this is the cure, but it can't hurt
> to
> >> > rule
> >> > >>> out
> >> > >>> >> > > the index having "memory"...
> >> > >>> >> > >
> >> > >>> >> > > Best,
> >> > >>> >> > > Erick
> >> > >>> >> > >
> >> > >>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> >> > >>> >> > > <ed...@gmail.com> wrote:
> >> > >>> >> > > > Hi Erick,
> >> > >>> >> > > >
> >> > >>> >> > > > I used the following query to delete all the index.
> >> > >>> >> > > >
> >> > >>> >> > > > http://localhost:8983/solr/update?stream.body=
> >> > >>> >> > > <delete><query>*:*</query></delete>
> >> > >>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
> >> > >>> >> > > >
> >> > >>> >> > > >
> >> > >>> >> > > > Or is it better to physically delete the entire data
> >> > directory?
> >> > >>> >> > > >
> >> > >>> >> > > >
> >> > >>> >> > > > Regards,
> >> > >>> >> > > > Edwin
> >> > >>> >> > > >
> >> > >>> >> > > >
> >> > >>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
> >> > >>> erickerickson@gmail.com>
> >> > >>> >> > > wrote:
> >> > >>> >> > > >
> >> > >>> >> > > >> You say you re-indexed, did you _completely_ remove the
> data
> >> > >>> >> directory
> >> > >>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
> >> > >>> >> directories?
> >> > >>> >> > > >> I've occasionally seen remnants of old definitions
> "pollute"
> >> > >>> the new
> >> > >>> >> > > >> one, and since the <uniqueKey> key is so fundamental I
> can
> >> > see
> >> > >>> it
> >> > >>> >> > > >> being a problem.
> >> > >>> >> > > >>
> >> > >>> >> > > >> Best,
> >> > >>> >> > > >> Erick
> >> > >>> >> > > >>
> >> > >>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> >> > >>> >> > > a.gazzarini@gmail.com>
> >> > >>> >> > > >> wrote:
> >> > >>> >> > > >> > Hi Edwin,
> >> > >>> >> > > >> > please provide some other detail about your context,
> (e.g.
> >> > >>> >> complete
> >> > >>> >> > > >> > stacktrace, query you're issuing)
> >> > >>> >> > > >> >
> >> > >>> >> > > >> > Best,
> >> > >>> >> > > >> > Andrea
> >> > >>> >> > > >> >
> >> > >>> >> > > >> >
> >> > >>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >> Hi everyone,
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >> I've changed my uniqueKey to another name, instead of
> >> > using
> >> > >>> id,
> >> > >>> >> on
> >> > >>> >> > > the
> >> > >>> >> > > >> >> schema.xml.
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >> However, after I have done the indexing (the
> indexing is
> >> > >>> >> > successful),
> >> > >>> >> > > >> I'm
> >> > >>> >> > > >> >> not able to perform a search query on it. I gives the
> >> > error
> >> > >>> >> > > >> >> java.lang.NullPointerException.
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >> Is there other place which I need to configure,
> besides
> >> > >>> changing
> >> > >>> >> > the
> >> > >>> >> > > >> >> uniqueKey field in scheam.xml?
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >> Regards,
> >> > >>> >> > > >> >> Edwin
> >> > >>> >> > > >> >>
> >> > >>> >> > > >> >
> >> > >>> >> > > >>
> >> > >>> >> > >
> >> > >>> >> >
> >> > >>> >>
> >> > >>>
> >> > >>
> >> > >>
> >> >
> >
>

Re: Unable to perform search query after changing uniqueKey

Posted by Erick Erickson <er...@gmail.com>.
Steve:

Totally agree. Even if you _do_ correctly escape the URL though,
there's no guarantee that Solr will "do the right thing" with field
names with spaces. Plus endless chances for you to get it wrong when
constructing the URL....

Best,
Erick

On Wed, Apr 1, 2015 at 1:01 AM, steve <sc...@hotmail.com> wrote:
> Gently walking into rough waters here, but if you use any API with GET, you're sending a URI which must be properly encoded. This has nothing to do with with the programming language that generates key and store pairs on the browser or the one(s) used on the server. Lots and lots of good folks have tripped over this one.http://www.w3schools.com/tags/ref_urlencode.asp
> Play hard, but play safe!
>
>> Date: Wed, 1 Apr 2015 13:58:55 +0800
>> Subject: Re: Unable to perform search query after changing uniqueKey
>> From: edwinyeozl@gmail.com
>> To: solr-user@lucene.apache.org
>>
>> Thanks Erick.
>>
>> Yes, it is able to work correct if I do not use spaces for the field names,
>> especially for the uniqueKey.
>>
>> Regards,
>> Edwin
>>
>>
>> On 31 March 2015 at 13:58, Erick Erickson <er...@gmail.com> wrote:
>>
>> > I would never put spaces in my field names! Frankly I have no clue
>> > what Solr does with that, but it can't be good. Solr explicitly
>> > supports Java naming conventions, camel case, underscores and numbers.
>> > Special symbols are frowned upon, I never use anything but upper case,
>> > lower case and underscores. Actually, I don't use upper case either
>> > but that's a personal preference. Other things might work, but only by
>> > chance.
>> >
>> > Best,
>> > Erick
>> >
>> > On Mon, Mar 30, 2015 at 8:59 PM, Zheng Lin Edwin Yeo
>> > <ed...@gmail.com> wrote:
>> > > Latest information that I've found for this is that the error only occurs
>> > > for shard2.
>> > >
>> > > If I do a search for just shard1, those records that are assigned to
>> > shard1
>> > > will be able to be displayed. Only when I search for shard2 will the
>> > > NullPointerException error occurs. Previously I was doing a search for
>> > both
>> > > shards.
>> > >
>> > > Is there any settings that I required to do for shard2 in order to solve
>> > > this issue? Currently I have not made any changes to the shards since I
>> > > created it using
>> > >
>> > http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1
>> > >
>> > >
>> > > Regards,
>> > > Edwin
>> > >
>> > > On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <ed...@gmail.com>
>> > wrote:
>> > >
>> > >> Hi Erick,
>> > >>
>> > >> I've changed the uniqueKey from id to Item No.
>> > >>
>> > >> <uniqueKey>Item No</uniqueKey>
>> > >>
>> > >>
>> > >> Below are my definitions for both the id and Item No.
>> > >>
>> > >> <field name="id" type="string" indexed="true" stored="true"
>> > >> required="false" multiValued="false" />
>> > >> <field name="Item No" type="text_general" indexed="true" stored="true"/>
>> > >>
>> > >> Regards,
>> > >> Edwin
>> > >>
>> > >>
>> > >> On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com>
>> > wrote:
>> > >>
>> > >>> Well, let's see the definition of your ID field, 'cause I'm puzzled.
>> > >>>
>> > >>> It's definitely A Bad Thing to have it be any kind of tokenized field
>> > >>> though, but that's a shot in the dark.
>> > >>>
>> > >>> Best,
>> > >>> Erick
>> > >>>
>> > >>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
>> > >>> <ed...@gmail.com> wrote:
>> > >>> > Hi Mostafa,
>> > >>> >
>> > >>> > Yes, I've defined all the fields in schema.xml. It is able to work on
>> > >>> the
>> > >>> > version without SolrCloud, but it is not working for the one with
>> > >>> SolrCloud.
>> > >>> > Both of them are using the same schema.xml.
>> > >>> >
>> > >>> > Regards,
>> > >>> > Edwin
>> > >>> >
>> > >>> >
>> > >>> >
>> > >>> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
>> > >>> wrote:
>> > >>> >
>> > >>> >> Hi Zheng,
>> > >>> >>
>> > >>> >> It's possible that there's a problem with your schema.xml. Are all
>> > >>> fields
>> > >>> >> defined and have appropriate options enabled?
>> > >>> >>
>> > >>> >> Regards,
>> > >>> >>
>> > >>> >> Mostafa.
>> > >>> >>
>> > >>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
>> > >>> edwinyeozl@gmail.com
>> > >>> >> >
>> > >>> >> wrote:
>> > >>> >>
>> > >>> >> > Hi Erick,
>> > >>> >> >
>> > >>> >> > I've tried that, and removed the data directory from both the
>> > >>> shards. But
>> > >>> >> > the same problem still occurs, so we probably can rule out the
>> > >>> "memory"
>> > >>> >> > issue.
>> > >>> >> >
>> > >>> >> > Regards,
>> > >>> >> > Edwin
>> > >>> >> >
>> > >>> >> > On 30 March 2015 at 12:39, Erick Erickson <
>> > erickerickson@gmail.com>
>> > >>> >> wrote:
>> > >>> >> >
>> > >>> >> > > I meant shut down Solr and physically remove the entire data
>> > >>> >> > > directory. Not saying this is the cure, but it can't hurt to
>> > rule
>> > >>> out
>> > >>> >> > > the index having "memory"...
>> > >>> >> > >
>> > >>> >> > > Best,
>> > >>> >> > > Erick
>> > >>> >> > >
>> > >>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
>> > >>> >> > > <ed...@gmail.com> wrote:
>> > >>> >> > > > Hi Erick,
>> > >>> >> > > >
>> > >>> >> > > > I used the following query to delete all the index.
>> > >>> >> > > >
>> > >>> >> > > > http://localhost:8983/solr/update?stream.body=
>> > >>> >> > > <delete><query>*:*</query></delete>
>> > >>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
>> > >>> >> > > >
>> > >>> >> > > >
>> > >>> >> > > > Or is it better to physically delete the entire data
>> > directory?
>> > >>> >> > > >
>> > >>> >> > > >
>> > >>> >> > > > Regards,
>> > >>> >> > > > Edwin
>> > >>> >> > > >
>> > >>> >> > > >
>> > >>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
>> > >>> erickerickson@gmail.com>
>> > >>> >> > > wrote:
>> > >>> >> > > >
>> > >>> >> > > >> You say you re-indexed, did you _completely_ remove the data
>> > >>> >> directory
>> > >>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
>> > >>> >> directories?
>> > >>> >> > > >> I've occasionally seen remnants of old definitions "pollute"
>> > >>> the new
>> > >>> >> > > >> one, and since the <uniqueKey> key is so fundamental I can
>> > see
>> > >>> it
>> > >>> >> > > >> being a problem.
>> > >>> >> > > >>
>> > >>> >> > > >> Best,
>> > >>> >> > > >> Erick
>> > >>> >> > > >>
>> > >>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
>> > >>> >> > > a.gazzarini@gmail.com>
>> > >>> >> > > >> wrote:
>> > >>> >> > > >> > Hi Edwin,
>> > >>> >> > > >> > please provide some other detail about your context, (e.g.
>> > >>> >> complete
>> > >>> >> > > >> > stacktrace, query you're issuing)
>> > >>> >> > > >> >
>> > >>> >> > > >> > Best,
>> > >>> >> > > >> > Andrea
>> > >>> >> > > >> >
>> > >>> >> > > >> >
>> > >>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>> > >>> >> > > >> >>
>> > >>> >> > > >> >> Hi everyone,
>> > >>> >> > > >> >>
>> > >>> >> > > >> >> I've changed my uniqueKey to another name, instead of
>> > using
>> > >>> id,
>> > >>> >> on
>> > >>> >> > > the
>> > >>> >> > > >> >> schema.xml.
>> > >>> >> > > >> >>
>> > >>> >> > > >> >> However, after I have done the indexing (the indexing is
>> > >>> >> > successful),
>> > >>> >> > > >> I'm
>> > >>> >> > > >> >> not able to perform a search query on it. I gives the
>> > error
>> > >>> >> > > >> >> java.lang.NullPointerException.
>> > >>> >> > > >> >>
>> > >>> >> > > >> >> Is there other place which I need to configure, besides
>> > >>> changing
>> > >>> >> > the
>> > >>> >> > > >> >> uniqueKey field in scheam.xml?
>> > >>> >> > > >> >>
>> > >>> >> > > >> >> Regards,
>> > >>> >> > > >> >> Edwin
>> > >>> >> > > >> >>
>> > >>> >> > > >> >
>> > >>> >> > > >>
>> > >>> >> > >
>> > >>> >> >
>> > >>> >>
>> > >>>
>> > >>
>> > >>
>> >
>

RE: Unable to perform search query after changing uniqueKey

Posted by steve <sc...@hotmail.com>.
Gently walking into rough waters here, but if you use any API with GET, you're sending a URI which must be properly encoded. This has nothing to do with with the programming language that generates key and store pairs on the browser or the one(s) used on the server. Lots and lots of good folks have tripped over this one.http://www.w3schools.com/tags/ref_urlencode.asp
Play hard, but play safe!

> Date: Wed, 1 Apr 2015 13:58:55 +0800
> Subject: Re: Unable to perform search query after changing uniqueKey
> From: edwinyeozl@gmail.com
> To: solr-user@lucene.apache.org
> 
> Thanks Erick.
> 
> Yes, it is able to work correct if I do not use spaces for the field names,
> especially for the uniqueKey.
> 
> Regards,
> Edwin
> 
> 
> On 31 March 2015 at 13:58, Erick Erickson <er...@gmail.com> wrote:
> 
> > I would never put spaces in my field names! Frankly I have no clue
> > what Solr does with that, but it can't be good. Solr explicitly
> > supports Java naming conventions, camel case, underscores and numbers.
> > Special symbols are frowned upon, I never use anything but upper case,
> > lower case and underscores. Actually, I don't use upper case either
> > but that's a personal preference. Other things might work, but only by
> > chance.
> >
> > Best,
> > Erick
> >
> > On Mon, Mar 30, 2015 at 8:59 PM, Zheng Lin Edwin Yeo
> > <ed...@gmail.com> wrote:
> > > Latest information that I've found for this is that the error only occurs
> > > for shard2.
> > >
> > > If I do a search for just shard1, those records that are assigned to
> > shard1
> > > will be able to be displayed. Only when I search for shard2 will the
> > > NullPointerException error occurs. Previously I was doing a search for
> > both
> > > shards.
> > >
> > > Is there any settings that I required to do for shard2 in order to solve
> > > this issue? Currently I have not made any changes to the shards since I
> > > created it using
> > >
> > http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1
> > >
> > >
> > > Regards,
> > > Edwin
> > >
> > > On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <ed...@gmail.com>
> > wrote:
> > >
> > >> Hi Erick,
> > >>
> > >> I've changed the uniqueKey from id to Item No.
> > >>
> > >> <uniqueKey>Item No</uniqueKey>
> > >>
> > >>
> > >> Below are my definitions for both the id and Item No.
> > >>
> > >> <field name="id" type="string" indexed="true" stored="true"
> > >> required="false" multiValued="false" />
> > >> <field name="Item No" type="text_general" indexed="true" stored="true"/>
> > >>
> > >> Regards,
> > >> Edwin
> > >>
> > >>
> > >> On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com>
> > wrote:
> > >>
> > >>> Well, let's see the definition of your ID field, 'cause I'm puzzled.
> > >>>
> > >>> It's definitely A Bad Thing to have it be any kind of tokenized field
> > >>> though, but that's a shot in the dark.
> > >>>
> > >>> Best,
> > >>> Erick
> > >>>
> > >>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
> > >>> <ed...@gmail.com> wrote:
> > >>> > Hi Mostafa,
> > >>> >
> > >>> > Yes, I've defined all the fields in schema.xml. It is able to work on
> > >>> the
> > >>> > version without SolrCloud, but it is not working for the one with
> > >>> SolrCloud.
> > >>> > Both of them are using the same schema.xml.
> > >>> >
> > >>> > Regards,
> > >>> > Edwin
> > >>> >
> > >>> >
> > >>> >
> > >>> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
> > >>> wrote:
> > >>> >
> > >>> >> Hi Zheng,
> > >>> >>
> > >>> >> It's possible that there's a problem with your schema.xml. Are all
> > >>> fields
> > >>> >> defined and have appropriate options enabled?
> > >>> >>
> > >>> >> Regards,
> > >>> >>
> > >>> >> Mostafa.
> > >>> >>
> > >>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
> > >>> edwinyeozl@gmail.com
> > >>> >> >
> > >>> >> wrote:
> > >>> >>
> > >>> >> > Hi Erick,
> > >>> >> >
> > >>> >> > I've tried that, and removed the data directory from both the
> > >>> shards. But
> > >>> >> > the same problem still occurs, so we probably can rule out the
> > >>> "memory"
> > >>> >> > issue.
> > >>> >> >
> > >>> >> > Regards,
> > >>> >> > Edwin
> > >>> >> >
> > >>> >> > On 30 March 2015 at 12:39, Erick Erickson <
> > erickerickson@gmail.com>
> > >>> >> wrote:
> > >>> >> >
> > >>> >> > > I meant shut down Solr and physically remove the entire data
> > >>> >> > > directory. Not saying this is the cure, but it can't hurt to
> > rule
> > >>> out
> > >>> >> > > the index having "memory"...
> > >>> >> > >
> > >>> >> > > Best,
> > >>> >> > > Erick
> > >>> >> > >
> > >>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> > >>> >> > > <ed...@gmail.com> wrote:
> > >>> >> > > > Hi Erick,
> > >>> >> > > >
> > >>> >> > > > I used the following query to delete all the index.
> > >>> >> > > >
> > >>> >> > > > http://localhost:8983/solr/update?stream.body=
> > >>> >> > > <delete><query>*:*</query></delete>
> > >>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
> > >>> >> > > >
> > >>> >> > > >
> > >>> >> > > > Or is it better to physically delete the entire data
> > directory?
> > >>> >> > > >
> > >>> >> > > >
> > >>> >> > > > Regards,
> > >>> >> > > > Edwin
> > >>> >> > > >
> > >>> >> > > >
> > >>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
> > >>> erickerickson@gmail.com>
> > >>> >> > > wrote:
> > >>> >> > > >
> > >>> >> > > >> You say you re-indexed, did you _completely_ remove the data
> > >>> >> directory
> > >>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
> > >>> >> directories?
> > >>> >> > > >> I've occasionally seen remnants of old definitions "pollute"
> > >>> the new
> > >>> >> > > >> one, and since the <uniqueKey> key is so fundamental I can
> > see
> > >>> it
> > >>> >> > > >> being a problem.
> > >>> >> > > >>
> > >>> >> > > >> Best,
> > >>> >> > > >> Erick
> > >>> >> > > >>
> > >>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> > >>> >> > > a.gazzarini@gmail.com>
> > >>> >> > > >> wrote:
> > >>> >> > > >> > Hi Edwin,
> > >>> >> > > >> > please provide some other detail about your context, (e.g.
> > >>> >> complete
> > >>> >> > > >> > stacktrace, query you're issuing)
> > >>> >> > > >> >
> > >>> >> > > >> > Best,
> > >>> >> > > >> > Andrea
> > >>> >> > > >> >
> > >>> >> > > >> >
> > >>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> > >>> >> > > >> >>
> > >>> >> > > >> >> Hi everyone,
> > >>> >> > > >> >>
> > >>> >> > > >> >> I've changed my uniqueKey to another name, instead of
> > using
> > >>> id,
> > >>> >> on
> > >>> >> > > the
> > >>> >> > > >> >> schema.xml.
> > >>> >> > > >> >>
> > >>> >> > > >> >> However, after I have done the indexing (the indexing is
> > >>> >> > successful),
> > >>> >> > > >> I'm
> > >>> >> > > >> >> not able to perform a search query on it. I gives the
> > error
> > >>> >> > > >> >> java.lang.NullPointerException.
> > >>> >> > > >> >>
> > >>> >> > > >> >> Is there other place which I need to configure, besides
> > >>> changing
> > >>> >> > the
> > >>> >> > > >> >> uniqueKey field in scheam.xml?
> > >>> >> > > >> >>
> > >>> >> > > >> >> Regards,
> > >>> >> > > >> >> Edwin
> > >>> >> > > >> >>
> > >>> >> > > >> >
> > >>> >> > > >>
> > >>> >> > >
> > >>> >> >
> > >>> >>
> > >>>
> > >>
> > >>
> >
 		 	   		  

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Thanks Erick.

Yes, it is able to work correct if I do not use spaces for the field names,
especially for the uniqueKey.

Regards,
Edwin


On 31 March 2015 at 13:58, Erick Erickson <er...@gmail.com> wrote:

> I would never put spaces in my field names! Frankly I have no clue
> what Solr does with that, but it can't be good. Solr explicitly
> supports Java naming conventions, camel case, underscores and numbers.
> Special symbols are frowned upon, I never use anything but upper case,
> lower case and underscores. Actually, I don't use upper case either
> but that's a personal preference. Other things might work, but only by
> chance.
>
> Best,
> Erick
>
> On Mon, Mar 30, 2015 at 8:59 PM, Zheng Lin Edwin Yeo
> <ed...@gmail.com> wrote:
> > Latest information that I've found for this is that the error only occurs
> > for shard2.
> >
> > If I do a search for just shard1, those records that are assigned to
> shard1
> > will be able to be displayed. Only when I search for shard2 will the
> > NullPointerException error occurs. Previously I was doing a search for
> both
> > shards.
> >
> > Is there any settings that I required to do for shard2 in order to solve
> > this issue? Currently I have not made any changes to the shards since I
> > created it using
> >
> http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1
> >
> >
> > Regards,
> > Edwin
> >
> > On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <ed...@gmail.com>
> wrote:
> >
> >> Hi Erick,
> >>
> >> I've changed the uniqueKey from id to Item No.
> >>
> >> <uniqueKey>Item No</uniqueKey>
> >>
> >>
> >> Below are my definitions for both the id and Item No.
> >>
> >> <field name="id" type="string" indexed="true" stored="true"
> >> required="false" multiValued="false" />
> >> <field name="Item No" type="text_general" indexed="true" stored="true"/>
> >>
> >> Regards,
> >> Edwin
> >>
> >>
> >> On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com>
> wrote:
> >>
> >>> Well, let's see the definition of your ID field, 'cause I'm puzzled.
> >>>
> >>> It's definitely A Bad Thing to have it be any kind of tokenized field
> >>> though, but that's a shot in the dark.
> >>>
> >>> Best,
> >>> Erick
> >>>
> >>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
> >>> <ed...@gmail.com> wrote:
> >>> > Hi Mostafa,
> >>> >
> >>> > Yes, I've defined all the fields in schema.xml. It is able to work on
> >>> the
> >>> > version without SolrCloud, but it is not working for the one with
> >>> SolrCloud.
> >>> > Both of them are using the same schema.xml.
> >>> >
> >>> > Regards,
> >>> > Edwin
> >>> >
> >>> >
> >>> >
> >>> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
> >>> wrote:
> >>> >
> >>> >> Hi Zheng,
> >>> >>
> >>> >> It's possible that there's a problem with your schema.xml. Are all
> >>> fields
> >>> >> defined and have appropriate options enabled?
> >>> >>
> >>> >> Regards,
> >>> >>
> >>> >> Mostafa.
> >>> >>
> >>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
> >>> edwinyeozl@gmail.com
> >>> >> >
> >>> >> wrote:
> >>> >>
> >>> >> > Hi Erick,
> >>> >> >
> >>> >> > I've tried that, and removed the data directory from both the
> >>> shards. But
> >>> >> > the same problem still occurs, so we probably can rule out the
> >>> "memory"
> >>> >> > issue.
> >>> >> >
> >>> >> > Regards,
> >>> >> > Edwin
> >>> >> >
> >>> >> > On 30 March 2015 at 12:39, Erick Erickson <
> erickerickson@gmail.com>
> >>> >> wrote:
> >>> >> >
> >>> >> > > I meant shut down Solr and physically remove the entire data
> >>> >> > > directory. Not saying this is the cure, but it can't hurt to
> rule
> >>> out
> >>> >> > > the index having "memory"...
> >>> >> > >
> >>> >> > > Best,
> >>> >> > > Erick
> >>> >> > >
> >>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> >>> >> > > <ed...@gmail.com> wrote:
> >>> >> > > > Hi Erick,
> >>> >> > > >
> >>> >> > > > I used the following query to delete all the index.
> >>> >> > > >
> >>> >> > > > http://localhost:8983/solr/update?stream.body=
> >>> >> > > <delete><query>*:*</query></delete>
> >>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
> >>> >> > > >
> >>> >> > > >
> >>> >> > > > Or is it better to physically delete the entire data
> directory?
> >>> >> > > >
> >>> >> > > >
> >>> >> > > > Regards,
> >>> >> > > > Edwin
> >>> >> > > >
> >>> >> > > >
> >>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
> >>> erickerickson@gmail.com>
> >>> >> > > wrote:
> >>> >> > > >
> >>> >> > > >> You say you re-indexed, did you _completely_ remove the data
> >>> >> directory
> >>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
> >>> >> directories?
> >>> >> > > >> I've occasionally seen remnants of old definitions "pollute"
> >>> the new
> >>> >> > > >> one, and since the <uniqueKey> key is so fundamental I can
> see
> >>> it
> >>> >> > > >> being a problem.
> >>> >> > > >>
> >>> >> > > >> Best,
> >>> >> > > >> Erick
> >>> >> > > >>
> >>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> >>> >> > > a.gazzarini@gmail.com>
> >>> >> > > >> wrote:
> >>> >> > > >> > Hi Edwin,
> >>> >> > > >> > please provide some other detail about your context, (e.g.
> >>> >> complete
> >>> >> > > >> > stacktrace, query you're issuing)
> >>> >> > > >> >
> >>> >> > > >> > Best,
> >>> >> > > >> > Andrea
> >>> >> > > >> >
> >>> >> > > >> >
> >>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> >>> >> > > >> >>
> >>> >> > > >> >> Hi everyone,
> >>> >> > > >> >>
> >>> >> > > >> >> I've changed my uniqueKey to another name, instead of
> using
> >>> id,
> >>> >> on
> >>> >> > > the
> >>> >> > > >> >> schema.xml.
> >>> >> > > >> >>
> >>> >> > > >> >> However, after I have done the indexing (the indexing is
> >>> >> > successful),
> >>> >> > > >> I'm
> >>> >> > > >> >> not able to perform a search query on it. I gives the
> error
> >>> >> > > >> >> java.lang.NullPointerException.
> >>> >> > > >> >>
> >>> >> > > >> >> Is there other place which I need to configure, besides
> >>> changing
> >>> >> > the
> >>> >> > > >> >> uniqueKey field in scheam.xml?
> >>> >> > > >> >>
> >>> >> > > >> >> Regards,
> >>> >> > > >> >> Edwin
> >>> >> > > >> >>
> >>> >> > > >> >
> >>> >> > > >>
> >>> >> > >
> >>> >> >
> >>> >>
> >>>
> >>
> >>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Erick Erickson <er...@gmail.com>.
I would never put spaces in my field names! Frankly I have no clue
what Solr does with that, but it can't be good. Solr explicitly
supports Java naming conventions, camel case, underscores and numbers.
Special symbols are frowned upon, I never use anything but upper case,
lower case and underscores. Actually, I don't use upper case either
but that's a personal preference. Other things might work, but only by
chance.

Best,
Erick

On Mon, Mar 30, 2015 at 8:59 PM, Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
> Latest information that I've found for this is that the error only occurs
> for shard2.
>
> If I do a search for just shard1, those records that are assigned to shard1
> will be able to be displayed. Only when I search for shard2 will the
> NullPointerException error occurs. Previously I was doing a search for both
> shards.
>
> Is there any settings that I required to do for shard2 in order to solve
> this issue? Currently I have not made any changes to the shards since I
> created it using
> http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1
>
>
> Regards,
> Edwin
>
> On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <ed...@gmail.com> wrote:
>
>> Hi Erick,
>>
>> I've changed the uniqueKey from id to Item No.
>>
>> <uniqueKey>Item No</uniqueKey>
>>
>>
>> Below are my definitions for both the id and Item No.
>>
>> <field name="id" type="string" indexed="true" stored="true"
>> required="false" multiValued="false" />
>> <field name="Item No" type="text_general" indexed="true" stored="true"/>
>>
>> Regards,
>> Edwin
>>
>>
>> On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com> wrote:
>>
>>> Well, let's see the definition of your ID field, 'cause I'm puzzled.
>>>
>>> It's definitely A Bad Thing to have it be any kind of tokenized field
>>> though, but that's a shot in the dark.
>>>
>>> Best,
>>> Erick
>>>
>>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
>>> <ed...@gmail.com> wrote:
>>> > Hi Mostafa,
>>> >
>>> > Yes, I've defined all the fields in schema.xml. It is able to work on
>>> the
>>> > version without SolrCloud, but it is not working for the one with
>>> SolrCloud.
>>> > Both of them are using the same schema.xml.
>>> >
>>> > Regards,
>>> > Edwin
>>> >
>>> >
>>> >
>>> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
>>> wrote:
>>> >
>>> >> Hi Zheng,
>>> >>
>>> >> It's possible that there's a problem with your schema.xml. Are all
>>> fields
>>> >> defined and have appropriate options enabled?
>>> >>
>>> >> Regards,
>>> >>
>>> >> Mostafa.
>>> >>
>>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
>>> edwinyeozl@gmail.com
>>> >> >
>>> >> wrote:
>>> >>
>>> >> > Hi Erick,
>>> >> >
>>> >> > I've tried that, and removed the data directory from both the
>>> shards. But
>>> >> > the same problem still occurs, so we probably can rule out the
>>> "memory"
>>> >> > issue.
>>> >> >
>>> >> > Regards,
>>> >> > Edwin
>>> >> >
>>> >> > On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> > > I meant shut down Solr and physically remove the entire data
>>> >> > > directory. Not saying this is the cure, but it can't hurt to rule
>>> out
>>> >> > > the index having "memory"...
>>> >> > >
>>> >> > > Best,
>>> >> > > Erick
>>> >> > >
>>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
>>> >> > > <ed...@gmail.com> wrote:
>>> >> > > > Hi Erick,
>>> >> > > >
>>> >> > > > I used the following query to delete all the index.
>>> >> > > >
>>> >> > > > http://localhost:8983/solr/update?stream.body=
>>> >> > > <delete><query>*:*</query></delete>
>>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
>>> >> > > >
>>> >> > > >
>>> >> > > > Or is it better to physically delete the entire data directory?
>>> >> > > >
>>> >> > > >
>>> >> > > > Regards,
>>> >> > > > Edwin
>>> >> > > >
>>> >> > > >
>>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
>>> erickerickson@gmail.com>
>>> >> > > wrote:
>>> >> > > >
>>> >> > > >> You say you re-indexed, did you _completely_ remove the data
>>> >> directory
>>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
>>> >> directories?
>>> >> > > >> I've occasionally seen remnants of old definitions "pollute"
>>> the new
>>> >> > > >> one, and since the <uniqueKey> key is so fundamental I can see
>>> it
>>> >> > > >> being a problem.
>>> >> > > >>
>>> >> > > >> Best,
>>> >> > > >> Erick
>>> >> > > >>
>>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
>>> >> > > a.gazzarini@gmail.com>
>>> >> > > >> wrote:
>>> >> > > >> > Hi Edwin,
>>> >> > > >> > please provide some other detail about your context, (e.g.
>>> >> complete
>>> >> > > >> > stacktrace, query you're issuing)
>>> >> > > >> >
>>> >> > > >> > Best,
>>> >> > > >> > Andrea
>>> >> > > >> >
>>> >> > > >> >
>>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>>> >> > > >> >>
>>> >> > > >> >> Hi everyone,
>>> >> > > >> >>
>>> >> > > >> >> I've changed my uniqueKey to another name, instead of using
>>> id,
>>> >> on
>>> >> > > the
>>> >> > > >> >> schema.xml.
>>> >> > > >> >>
>>> >> > > >> >> However, after I have done the indexing (the indexing is
>>> >> > successful),
>>> >> > > >> I'm
>>> >> > > >> >> not able to perform a search query on it. I gives the error
>>> >> > > >> >> java.lang.NullPointerException.
>>> >> > > >> >>
>>> >> > > >> >> Is there other place which I need to configure, besides
>>> changing
>>> >> > the
>>> >> > > >> >> uniqueKey field in scheam.xml?
>>> >> > > >> >>
>>> >> > > >> >> Regards,
>>> >> > > >> >> Edwin
>>> >> > > >> >>
>>> >> > > >> >
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >>
>>>
>>
>>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Latest information that I've found for this is that the error only occurs
for shard2.

If I do a search for just shard1, those records that are assigned to shard1
will be able to be displayed. Only when I search for shard2 will the
NullPointerException error occurs. Previously I was doing a search for both
shards.

Is there any settings that I required to do for shard2 in order to solve
this issue? Currently I have not made any changes to the shards since I
created it using
http://localhost:8983/solr/admin/collections?action=CREATE&name=nps1&numShards=2&collection.configName=collection1


Regards,
Edwin

On 31 March 2015 at 09:42, Zheng Lin Edwin Yeo <ed...@gmail.com> wrote:

> Hi Erick,
>
> I've changed the uniqueKey from id to Item No.
>
> <uniqueKey>Item No</uniqueKey>
>
>
> Below are my definitions for both the id and Item No.
>
> <field name="id" type="string" indexed="true" stored="true"
> required="false" multiValued="false" />
> <field name="Item No" type="text_general" indexed="true" stored="true"/>
>
> Regards,
> Edwin
>
>
> On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com> wrote:
>
>> Well, let's see the definition of your ID field, 'cause I'm puzzled.
>>
>> It's definitely A Bad Thing to have it be any kind of tokenized field
>> though, but that's a shot in the dark.
>>
>> Best,
>> Erick
>>
>> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
>> <ed...@gmail.com> wrote:
>> > Hi Mostafa,
>> >
>> > Yes, I've defined all the fields in schema.xml. It is able to work on
>> the
>> > version without SolrCloud, but it is not working for the one with
>> SolrCloud.
>> > Both of them are using the same schema.xml.
>> >
>> > Regards,
>> > Edwin
>> >
>> >
>> >
>> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
>> wrote:
>> >
>> >> Hi Zheng,
>> >>
>> >> It's possible that there's a problem with your schema.xml. Are all
>> fields
>> >> defined and have appropriate options enabled?
>> >>
>> >> Regards,
>> >>
>> >> Mostafa.
>> >>
>> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
>> edwinyeozl@gmail.com
>> >> >
>> >> wrote:
>> >>
>> >> > Hi Erick,
>> >> >
>> >> > I've tried that, and removed the data directory from both the
>> shards. But
>> >> > the same problem still occurs, so we probably can rule out the
>> "memory"
>> >> > issue.
>> >> >
>> >> > Regards,
>> >> > Edwin
>> >> >
>> >> > On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com>
>> >> wrote:
>> >> >
>> >> > > I meant shut down Solr and physically remove the entire data
>> >> > > directory. Not saying this is the cure, but it can't hurt to rule
>> out
>> >> > > the index having "memory"...
>> >> > >
>> >> > > Best,
>> >> > > Erick
>> >> > >
>> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
>> >> > > <ed...@gmail.com> wrote:
>> >> > > > Hi Erick,
>> >> > > >
>> >> > > > I used the following query to delete all the index.
>> >> > > >
>> >> > > > http://localhost:8983/solr/update?stream.body=
>> >> > > <delete><query>*:*</query></delete>
>> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
>> >> > > >
>> >> > > >
>> >> > > > Or is it better to physically delete the entire data directory?
>> >> > > >
>> >> > > >
>> >> > > > Regards,
>> >> > > > Edwin
>> >> > > >
>> >> > > >
>> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
>> erickerickson@gmail.com>
>> >> > > wrote:
>> >> > > >
>> >> > > >> You say you re-indexed, did you _completely_ remove the data
>> >> directory
>> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
>> >> directories?
>> >> > > >> I've occasionally seen remnants of old definitions "pollute"
>> the new
>> >> > > >> one, and since the <uniqueKey> key is so fundamental I can see
>> it
>> >> > > >> being a problem.
>> >> > > >>
>> >> > > >> Best,
>> >> > > >> Erick
>> >> > > >>
>> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
>> >> > > a.gazzarini@gmail.com>
>> >> > > >> wrote:
>> >> > > >> > Hi Edwin,
>> >> > > >> > please provide some other detail about your context, (e.g.
>> >> complete
>> >> > > >> > stacktrace, query you're issuing)
>> >> > > >> >
>> >> > > >> > Best,
>> >> > > >> > Andrea
>> >> > > >> >
>> >> > > >> >
>> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>> >> > > >> >>
>> >> > > >> >> Hi everyone,
>> >> > > >> >>
>> >> > > >> >> I've changed my uniqueKey to another name, instead of using
>> id,
>> >> on
>> >> > > the
>> >> > > >> >> schema.xml.
>> >> > > >> >>
>> >> > > >> >> However, after I have done the indexing (the indexing is
>> >> > successful),
>> >> > > >> I'm
>> >> > > >> >> not able to perform a search query on it. I gives the error
>> >> > > >> >> java.lang.NullPointerException.
>> >> > > >> >>
>> >> > > >> >> Is there other place which I need to configure, besides
>> changing
>> >> > the
>> >> > > >> >> uniqueKey field in scheam.xml?
>> >> > > >> >>
>> >> > > >> >> Regards,
>> >> > > >> >> Edwin
>> >> > > >> >>
>> >> > > >> >
>> >> > > >>
>> >> > >
>> >> >
>> >>
>>
>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Erick,

I've changed the uniqueKey from id to Item No.

<uniqueKey>Item No</uniqueKey>


Below are my definitions for both the id and Item No.

<field name="id" type="string" indexed="true" stored="true"
required="false" multiValued="false" />
<field name="Item No" type="text_general" indexed="true" stored="true"/>

Regards,
Edwin


On 30 March 2015 at 23:05, Erick Erickson <er...@gmail.com> wrote:

> Well, let's see the definition of your ID field, 'cause I'm puzzled.
>
> It's definitely A Bad Thing to have it be any kind of tokenized field
> though, but that's a shot in the dark.
>
> Best,
> Erick
>
> On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
> <ed...@gmail.com> wrote:
> > Hi Mostafa,
> >
> > Yes, I've defined all the fields in schema.xml. It is able to work on the
> > version without SolrCloud, but it is not working for the one with
> SolrCloud.
> > Both of them are using the same schema.xml.
> >
> > Regards,
> > Edwin
> >
> >
> >
> > On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com>
> wrote:
> >
> >> Hi Zheng,
> >>
> >> It's possible that there's a problem with your schema.xml. Are all
> fields
> >> defined and have appropriate options enabled?
> >>
> >> Regards,
> >>
> >> Mostafa.
> >>
> >> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <
> edwinyeozl@gmail.com
> >> >
> >> wrote:
> >>
> >> > Hi Erick,
> >> >
> >> > I've tried that, and removed the data directory from both the shards.
> But
> >> > the same problem still occurs, so we probably can rule out the
> "memory"
> >> > issue.
> >> >
> >> > Regards,
> >> > Edwin
> >> >
> >> > On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com>
> >> wrote:
> >> >
> >> > > I meant shut down Solr and physically remove the entire data
> >> > > directory. Not saying this is the cure, but it can't hurt to rule
> out
> >> > > the index having "memory"...
> >> > >
> >> > > Best,
> >> > > Erick
> >> > >
> >> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> >> > > <ed...@gmail.com> wrote:
> >> > > > Hi Erick,
> >> > > >
> >> > > > I used the following query to delete all the index.
> >> > > >
> >> > > > http://localhost:8983/solr/update?stream.body=
> >> > > <delete><query>*:*</query></delete>
> >> > > http://localhost:8983/solr/update?stream.body=<commit/>
> >> > > >
> >> > > >
> >> > > > Or is it better to physically delete the entire data directory?
> >> > > >
> >> > > >
> >> > > > Regards,
> >> > > > Edwin
> >> > > >
> >> > > >
> >> > > > On 28 March 2015 at 02:27, Erick Erickson <
> erickerickson@gmail.com>
> >> > > wrote:
> >> > > >
> >> > > >> You say you re-indexed, did you _completely_ remove the data
> >> directory
> >> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
> >> directories?
> >> > > >> I've occasionally seen remnants of old definitions "pollute" the
> new
> >> > > >> one, and since the <uniqueKey> key is so fundamental I can see it
> >> > > >> being a problem.
> >> > > >>
> >> > > >> Best,
> >> > > >> Erick
> >> > > >>
> >> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> >> > > a.gazzarini@gmail.com>
> >> > > >> wrote:
> >> > > >> > Hi Edwin,
> >> > > >> > please provide some other detail about your context, (e.g.
> >> complete
> >> > > >> > stacktrace, query you're issuing)
> >> > > >> >
> >> > > >> > Best,
> >> > > >> > Andrea
> >> > > >> >
> >> > > >> >
> >> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> >> > > >> >>
> >> > > >> >> Hi everyone,
> >> > > >> >>
> >> > > >> >> I've changed my uniqueKey to another name, instead of using
> id,
> >> on
> >> > > the
> >> > > >> >> schema.xml.
> >> > > >> >>
> >> > > >> >> However, after I have done the indexing (the indexing is
> >> > successful),
> >> > > >> I'm
> >> > > >> >> not able to perform a search query on it. I gives the error
> >> > > >> >> java.lang.NullPointerException.
> >> > > >> >>
> >> > > >> >> Is there other place which I need to configure, besides
> changing
> >> > the
> >> > > >> >> uniqueKey field in scheam.xml?
> >> > > >> >>
> >> > > >> >> Regards,
> >> > > >> >> Edwin
> >> > > >> >>
> >> > > >> >
> >> > > >>
> >> > >
> >> >
> >>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Erick Erickson <er...@gmail.com>.
Well, let's see the definition of your ID field, 'cause I'm puzzled.

It's definitely A Bad Thing to have it be any kind of tokenized field
though, but that's a shot in the dark.

Best,
Erick

On Mon, Mar 30, 2015 at 2:17 AM, Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
> Hi Mostafa,
>
> Yes, I've defined all the fields in schema.xml. It is able to work on the
> version without SolrCloud, but it is not working for the one with SolrCloud.
> Both of them are using the same schema.xml.
>
> Regards,
> Edwin
>
>
>
> On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com> wrote:
>
>> Hi Zheng,
>>
>> It's possible that there's a problem with your schema.xml. Are all fields
>> defined and have appropriate options enabled?
>>
>> Regards,
>>
>> Mostafa.
>>
>> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com
>> >
>> wrote:
>>
>> > Hi Erick,
>> >
>> > I've tried that, and removed the data directory from both the shards. But
>> > the same problem still occurs, so we probably can rule out the "memory"
>> > issue.
>> >
>> > Regards,
>> > Edwin
>> >
>> > On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com>
>> wrote:
>> >
>> > > I meant shut down Solr and physically remove the entire data
>> > > directory. Not saying this is the cure, but it can't hurt to rule out
>> > > the index having "memory"...
>> > >
>> > > Best,
>> > > Erick
>> > >
>> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
>> > > <ed...@gmail.com> wrote:
>> > > > Hi Erick,
>> > > >
>> > > > I used the following query to delete all the index.
>> > > >
>> > > > http://localhost:8983/solr/update?stream.body=
>> > > <delete><query>*:*</query></delete>
>> > > http://localhost:8983/solr/update?stream.body=<commit/>
>> > > >
>> > > >
>> > > > Or is it better to physically delete the entire data directory?
>> > > >
>> > > >
>> > > > Regards,
>> > > > Edwin
>> > > >
>> > > >
>> > > > On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com>
>> > > wrote:
>> > > >
>> > > >> You say you re-indexed, did you _completely_ remove the data
>> directory
>> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
>> directories?
>> > > >> I've occasionally seen remnants of old definitions "pollute" the new
>> > > >> one, and since the <uniqueKey> key is so fundamental I can see it
>> > > >> being a problem.
>> > > >>
>> > > >> Best,
>> > > >> Erick
>> > > >>
>> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
>> > > a.gazzarini@gmail.com>
>> > > >> wrote:
>> > > >> > Hi Edwin,
>> > > >> > please provide some other detail about your context, (e.g.
>> complete
>> > > >> > stacktrace, query you're issuing)
>> > > >> >
>> > > >> > Best,
>> > > >> > Andrea
>> > > >> >
>> > > >> >
>> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>> > > >> >>
>> > > >> >> Hi everyone,
>> > > >> >>
>> > > >> >> I've changed my uniqueKey to another name, instead of using id,
>> on
>> > > the
>> > > >> >> schema.xml.
>> > > >> >>
>> > > >> >> However, after I have done the indexing (the indexing is
>> > successful),
>> > > >> I'm
>> > > >> >> not able to perform a search query on it. I gives the error
>> > > >> >> java.lang.NullPointerException.
>> > > >> >>
>> > > >> >> Is there other place which I need to configure, besides changing
>> > the
>> > > >> >> uniqueKey field in scheam.xml?
>> > > >> >>
>> > > >> >> Regards,
>> > > >> >> Edwin
>> > > >> >>
>> > > >> >
>> > > >>
>> > >
>> >
>>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Mostafa,

Yes, I've defined all the fields in schema.xml. It is able to work on the
version without SolrCloud, but it is not working for the one with SolrCloud.
Both of them are using the same schema.xml.

Regards,
Edwin



On 30 March 2015 at 14:34, Mostafa Gomaa <mo...@gmail.com> wrote:

> Hi Zheng,
>
> It's possible that there's a problem with your schema.xml. Are all fields
> defined and have appropriate options enabled?
>
> Regards,
>
> Mostafa.
>
> On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com
> >
> wrote:
>
> > Hi Erick,
> >
> > I've tried that, and removed the data directory from both the shards. But
> > the same problem still occurs, so we probably can rule out the "memory"
> > issue.
> >
> > Regards,
> > Edwin
> >
> > On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com>
> wrote:
> >
> > > I meant shut down Solr and physically remove the entire data
> > > directory. Not saying this is the cure, but it can't hurt to rule out
> > > the index having "memory"...
> > >
> > > Best,
> > > Erick
> > >
> > > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> > > <ed...@gmail.com> wrote:
> > > > Hi Erick,
> > > >
> > > > I used the following query to delete all the index.
> > > >
> > > > http://localhost:8983/solr/update?stream.body=
> > > <delete><query>*:*</query></delete>
> > > http://localhost:8983/solr/update?stream.body=<commit/>
> > > >
> > > >
> > > > Or is it better to physically delete the entire data directory?
> > > >
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > > >
> > > > On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com>
> > > wrote:
> > > >
> > > >> You say you re-indexed, did you _completely_ remove the data
> directory
> > > >> first, i.e. the parent of the "index" and, maybe, "tlog"
> directories?
> > > >> I've occasionally seen remnants of old definitions "pollute" the new
> > > >> one, and since the <uniqueKey> key is so fundamental I can see it
> > > >> being a problem.
> > > >>
> > > >> Best,
> > > >> Erick
> > > >>
> > > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> > > a.gazzarini@gmail.com>
> > > >> wrote:
> > > >> > Hi Edwin,
> > > >> > please provide some other detail about your context, (e.g.
> complete
> > > >> > stacktrace, query you're issuing)
> > > >> >
> > > >> > Best,
> > > >> > Andrea
> > > >> >
> > > >> >
> > > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> > > >> >>
> > > >> >> Hi everyone,
> > > >> >>
> > > >> >> I've changed my uniqueKey to another name, instead of using id,
> on
> > > the
> > > >> >> schema.xml.
> > > >> >>
> > > >> >> However, after I have done the indexing (the indexing is
> > successful),
> > > >> I'm
> > > >> >> not able to perform a search query on it. I gives the error
> > > >> >> java.lang.NullPointerException.
> > > >> >>
> > > >> >> Is there other place which I need to configure, besides changing
> > the
> > > >> >> uniqueKey field in scheam.xml?
> > > >> >>
> > > >> >> Regards,
> > > >> >> Edwin
> > > >> >>
> > > >> >
> > > >>
> > >
> >
>

Re: Unable to perform search query after changing uniqueKey

Posted by Mostafa Gomaa <mo...@gmail.com>.
Hi Zheng,

It's possible that there's a problem with your schema.xml. Are all fields
defined and have appropriate options enabled?

Regards,

Mostafa.

On Mon, Mar 30, 2015 at 7:49 AM, Zheng Lin Edwin Yeo <ed...@gmail.com>
wrote:

> Hi Erick,
>
> I've tried that, and removed the data directory from both the shards. But
> the same problem still occurs, so we probably can rule out the "memory"
> issue.
>
> Regards,
> Edwin
>
> On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com> wrote:
>
> > I meant shut down Solr and physically remove the entire data
> > directory. Not saying this is the cure, but it can't hurt to rule out
> > the index having "memory"...
> >
> > Best,
> > Erick
> >
> > On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> > <ed...@gmail.com> wrote:
> > > Hi Erick,
> > >
> > > I used the following query to delete all the index.
> > >
> > > http://localhost:8983/solr/update?stream.body=
> > <delete><query>*:*</query></delete>
> > http://localhost:8983/solr/update?stream.body=<commit/>
> > >
> > >
> > > Or is it better to physically delete the entire data directory?
> > >
> > >
> > > Regards,
> > > Edwin
> > >
> > >
> > > On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com>
> > wrote:
> > >
> > >> You say you re-indexed, did you _completely_ remove the data directory
> > >> first, i.e. the parent of the "index" and, maybe, "tlog" directories?
> > >> I've occasionally seen remnants of old definitions "pollute" the new
> > >> one, and since the <uniqueKey> key is so fundamental I can see it
> > >> being a problem.
> > >>
> > >> Best,
> > >> Erick
> > >>
> > >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> > a.gazzarini@gmail.com>
> > >> wrote:
> > >> > Hi Edwin,
> > >> > please provide some other detail about your context, (e.g. complete
> > >> > stacktrace, query you're issuing)
> > >> >
> > >> > Best,
> > >> > Andrea
> > >> >
> > >> >
> > >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> > >> >>
> > >> >> Hi everyone,
> > >> >>
> > >> >> I've changed my uniqueKey to another name, instead of using id, on
> > the
> > >> >> schema.xml.
> > >> >>
> > >> >> However, after I have done the indexing (the indexing is
> successful),
> > >> I'm
> > >> >> not able to perform a search query on it. I gives the error
> > >> >> java.lang.NullPointerException.
> > >> >>
> > >> >> Is there other place which I need to configure, besides changing
> the
> > >> >> uniqueKey field in scheam.xml?
> > >> >>
> > >> >> Regards,
> > >> >> Edwin
> > >> >>
> > >> >
> > >>
> >
>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Erick,

I've tried that, and removed the data directory from both the shards. But
the same problem still occurs, so we probably can rule out the "memory"
issue.

Regards,
Edwin

On 30 March 2015 at 12:39, Erick Erickson <er...@gmail.com> wrote:

> I meant shut down Solr and physically remove the entire data
> directory. Not saying this is the cure, but it can't hurt to rule out
> the index having "memory"...
>
> Best,
> Erick
>
> On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
> <ed...@gmail.com> wrote:
> > Hi Erick,
> >
> > I used the following query to delete all the index.
> >
> > http://localhost:8983/solr/update?stream.body=
> <delete><query>*:*</query></delete>
> http://localhost:8983/solr/update?stream.body=<commit/>
> >
> >
> > Or is it better to physically delete the entire data directory?
> >
> >
> > Regards,
> > Edwin
> >
> >
> > On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com>
> wrote:
> >
> >> You say you re-indexed, did you _completely_ remove the data directory
> >> first, i.e. the parent of the "index" and, maybe, "tlog" directories?
> >> I've occasionally seen remnants of old definitions "pollute" the new
> >> one, and since the <uniqueKey> key is so fundamental I can see it
> >> being a problem.
> >>
> >> Best,
> >> Erick
> >>
> >> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <
> a.gazzarini@gmail.com>
> >> wrote:
> >> > Hi Edwin,
> >> > please provide some other detail about your context, (e.g. complete
> >> > stacktrace, query you're issuing)
> >> >
> >> > Best,
> >> > Andrea
> >> >
> >> >
> >> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> >> >>
> >> >> Hi everyone,
> >> >>
> >> >> I've changed my uniqueKey to another name, instead of using id, on
> the
> >> >> schema.xml.
> >> >>
> >> >> However, after I have done the indexing (the indexing is successful),
> >> I'm
> >> >> not able to perform a search query on it. I gives the error
> >> >> java.lang.NullPointerException.
> >> >>
> >> >> Is there other place which I need to configure, besides changing the
> >> >> uniqueKey field in scheam.xml?
> >> >>
> >> >> Regards,
> >> >> Edwin
> >> >>
> >> >
> >>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Erick Erickson <er...@gmail.com>.
I meant shut down Solr and physically remove the entire data
directory. Not saying this is the cure, but it can't hurt to rule out
the index having "memory"...

Best,
Erick

On Sun, Mar 29, 2015 at 6:35 PM, Zheng Lin Edwin Yeo
<ed...@gmail.com> wrote:
> Hi Erick,
>
> I used the following query to delete all the index.
>
> http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>http://localhost:8983/solr/update?stream.body=<commit/>
>
>
> Or is it better to physically delete the entire data directory?
>
>
> Regards,
> Edwin
>
>
> On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com> wrote:
>
>> You say you re-indexed, did you _completely_ remove the data directory
>> first, i.e. the parent of the "index" and, maybe, "tlog" directories?
>> I've occasionally seen remnants of old definitions "pollute" the new
>> one, and since the <uniqueKey> key is so fundamental I can see it
>> being a problem.
>>
>> Best,
>> Erick
>>
>> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <a....@gmail.com>
>> wrote:
>> > Hi Edwin,
>> > please provide some other detail about your context, (e.g. complete
>> > stacktrace, query you're issuing)
>> >
>> > Best,
>> > Andrea
>> >
>> >
>> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>> >>
>> >> Hi everyone,
>> >>
>> >> I've changed my uniqueKey to another name, instead of using id, on the
>> >> schema.xml.
>> >>
>> >> However, after I have done the indexing (the indexing is successful),
>> I'm
>> >> not able to perform a search query on it. I gives the error
>> >> java.lang.NullPointerException.
>> >>
>> >> Is there other place which I need to configure, besides changing the
>> >> uniqueKey field in scheam.xml?
>> >>
>> >> Regards,
>> >> Edwin
>> >>
>> >
>>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Erick,

I used the following query to delete all the index.

http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>http://localhost:8983/solr/update?stream.body=<commit/>


Or is it better to physically delete the entire data directory?


Regards,
Edwin


On 28 March 2015 at 02:27, Erick Erickson <er...@gmail.com> wrote:

> You say you re-indexed, did you _completely_ remove the data directory
> first, i.e. the parent of the "index" and, maybe, "tlog" directories?
> I've occasionally seen remnants of old definitions "pollute" the new
> one, and since the <uniqueKey> key is so fundamental I can see it
> being a problem.
>
> Best,
> Erick
>
> On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <a....@gmail.com>
> wrote:
> > Hi Edwin,
> > please provide some other detail about your context, (e.g. complete
> > stacktrace, query you're issuing)
> >
> > Best,
> > Andrea
> >
> >
> > On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> >>
> >> Hi everyone,
> >>
> >> I've changed my uniqueKey to another name, instead of using id, on the
> >> schema.xml.
> >>
> >> However, after I have done the indexing (the indexing is successful),
> I'm
> >> not able to perform a search query on it. I gives the error
> >> java.lang.NullPointerException.
> >>
> >> Is there other place which I need to configure, besides changing the
> >> uniqueKey field in scheam.xml?
> >>
> >> Regards,
> >> Edwin
> >>
> >
>

Re: Unable to perform search query after changing uniqueKey

Posted by Erick Erickson <er...@gmail.com>.
You say you re-indexed, did you _completely_ remove the data directory
first, i.e. the parent of the "index" and, maybe, "tlog" directories?
I've occasionally seen remnants of old definitions "pollute" the new
one, and since the <uniqueKey> key is so fundamental I can see it
being a problem.

Best,
Erick

On Fri, Mar 27, 2015 at 1:42 AM, Andrea Gazzarini <a....@gmail.com> wrote:
> Hi Edwin,
> please provide some other detail about your context, (e.g. complete
> stacktrace, query you're issuing)
>
> Best,
> Andrea
>
>
> On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>>
>> Hi everyone,
>>
>> I've changed my uniqueKey to another name, instead of using id, on the
>> schema.xml.
>>
>> However, after I have done the indexing (the indexing is successful), I'm
>> not able to perform a search query on it. I gives the error
>> java.lang.NullPointerException.
>>
>> Is there other place which I need to configure, besides changing the
>> uniqueKey field in scheam.xml?
>>
>> Regards,
>> Edwin
>>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Hi Andrea,

This is the query that I'm using.
http://localhost:8983/solr/logmill/select?q=*:*&wt=xml&indent=true

This is the stacktrace that I got.

<?xml version="1.0" encoding="UTF-8"?>

<response>
<lst name="responseHeader">
   <int name="status">500</int>
   <int name="QTime">10</int>
   <lst name="params">
      <str name="indent">true</str>
      <str name="q">*:*</str>
      <str name="wt">xml</str>
   </lst>
</lst>

<lst name="error">
<str name="trace">java.lang.NullPointerException at
org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:1074)
at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:743)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:722)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:350)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2006) at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:413)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:368) at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at
org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source) </str>

<int name="code">500</int>
</lst>

</response>

I'm using SolrCloud setup.


Regards,
Edwin



On 27 March 2015 at 16:42, Andrea Gazzarini <a....@gmail.com> wrote:

> Hi Edwin,
> please provide some other detail about your context, (e.g. complete
> stacktrace, query you're issuing)
>
> Best,
> Andrea
>
>
> On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
>
>> Hi everyone,
>>
>> I've changed my uniqueKey to another name, instead of using id, on the
>> schema.xml.
>>
>> However, after I have done the indexing (the indexing is successful), I'm
>> not able to perform a search query on it. I gives the error
>> java.lang.NullPointerException.
>>
>> Is there other place which I need to configure, besides changing the
>> uniqueKey field in scheam.xml?
>>
>> Regards,
>> Edwin
>>
>>
>

Re: Unable to perform search query after changing uniqueKey

Posted by Andrea Gazzarini <a....@gmail.com>.
Hi Edwin,
please provide some other detail about your context, (e.g. complete 
stacktrace, query you're issuing)

Best,
Andrea

On 03/27/2015 09:38 AM, Zheng Lin Edwin Yeo wrote:
> Hi everyone,
>
> I've changed my uniqueKey to another name, instead of using id, on the
> schema.xml.
>
> However, after I have done the indexing (the indexing is successful), I'm
> not able to perform a search query on it. I gives the error
> java.lang.NullPointerException.
>
> Is there other place which I need to configure, besides changing the
> uniqueKey field in scheam.xml?
>
> Regards,
> Edwin
>