Problem indexing

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem indexing

Otis Gospodnetic-2
Hi,

This is related to SOLR-81.  Things bomb when I try indexing with my probably misconfigured schema.xml:
  - see it at http://www.krumpir.com/schema.xml - I added a few new fieldTypes, fields, and copyFields
  - just the diff: http://www.krumpir.com/schema.xml-diff.txt

I've created a dictionary.xml file with the following content:

<add>
  <doc>
    <field name="word">application</field>
  </doc>
</add>

I tried posting that, like this:
$ java -jar post.jar http://localhost:8983/solr/update dictionary.xml

That bombed with this:

SimplePostTool: WARNING: Unexpected response from Solr: '<result status="1">java.lang.NullPointerException
        at org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:248)
        at org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:134)
        at org.apache.solr.update.DirectUpdateHandler2.overwriteBoth(DirectUpdateHandler2.java:380)
        at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:236)
 
Does this look familiar to anyone?  Anything in that schema.xml looks fishy or plain wrong?

Thanks,
Otis


Reply | Threaded
Open this post in threaded view
|

Re: Problem indexing

Yonik Seeley-2
On 2/23/07, Otis Gospodnetic <[hidden email]> wrote:

> Hi,
>
> This is related to SOLR-81.  Things bomb when I try indexing with my probably misconfigured schema.xml:
>   - see it at http://www.krumpir.com/schema.xml - I added a few new fieldTypes, fields, and copyFields
>   - just the diff: http://www.krumpir.com/schema.xml-diff.txt
>
> I've created a dictionary.xml file with the following content:
>
> <add>
>   <doc>
>     <field name="word">application</field>
>   </doc>
> </add>
>
> I tried posting that, like this:
> $ java -jar post.jar http://localhost:8983/solr/update dictionary.xml
>
> That bombed with this:
>
> SimplePostTool: WARNING: Unexpected response from Solr: '<result status="1">java.lang.NullPointerException
>         at org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:248)
>         at org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:134)
>         at org.apache.solr.update.DirectUpdateHandler2.overwriteBoth(DirectUpdateHandler2.java:380)
>         at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:236)
>
> Does this look familiar to anyone?  Anything in that schema.xml looks fishy or plain wrong?

I think the document you are adding is missing the uniqueKeyField

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Problem indexing

Otis Gospodnetic-2
In reply to this post by Otis Gospodnetic-2
Oh, look at that, adding <field name="id">1</field> took care of the bombing, nice!

Thanks,
Otis

> I tried posting that, like this:
> $ java -jar post.jar http://localhost:8983/solr/update dictionary.xml
>
> That bombed with this:
>
> SimplePostTool: WARNING: Unexpected response from Solr: '<result status="1">java.lang.NullPointerException
>         at org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:248)
>         at org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:134)
>         at org.apache.solr.update.DirectUpdateHandler2.overwriteBoth(DirectUpdateHandler2.java:380)
>         at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:236)
>
> Does this look familiar to anyone?  Anything in that schema.xml looks fishy or plain wrong?

I think the document you are adding is missing the uniqueKeyField

-Yonik



Reply | Threaded
Open this post in threaded view
|

Re: Problem indexing

Walter Underwood, Netflix
It is a bug, though. That should send an error message, not a
stack trace. --wunder


On 2/23/07 10:39 AM, "Otis Gospodnetic" <[hidden email]> wrote:

> Oh, look at that, adding <field name="id">1</field> took care of the bombing,
> nice!
>
> Thanks,
> Otis
>
>> I tried posting that, like this:
>> $ java -jar post.jar http://localhost:8983/solr/update dictionary.xml
>>
>> That bombed with this:
>>
>> SimplePostTool: WARNING: Unexpected response from Solr: '<result
>> status="1">java.lang.NullPointerException
>>         at
>> org.apache.solr.schema.FieldType.storedToIndexed(FieldType.java:248)
>>         at
>> org.apache.solr.update.UpdateHandler.getIndexedId(UpdateHandler.java:134)
>>         at
>> org.apache.solr.update.DirectUpdateHandler2.overwriteBoth(DirectUpdateHandler
>> 2.java:380)
>>         at
>> org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:
>> 236)
>>
>> Does this look familiar to anyone?  Anything in that schema.xml looks fishy
>> or plain wrong?
>
> I think the document you are adding is missing the uniqueKeyField
>
> -Yonik
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Problem indexing

Chris Hostetter-3

: It is a bug, though. That should send an error message, not a
: stack trace. --wunder

I opened SOLR-172 to track getting a better exception then an NPE in this
case, but that *is* an error message being returned to the client, the
message just happens to be a stack trace ... SOLR-141 should hopefully
make the way errors get reported more uniform (if/when i/we ever get
arround to tackling it)


-Hoss