Right. You're requiring that every document have an ID (via uniqueKey), but
there's nothing
magic about DIH that'll automagically parse a PDF file and map something
into your ID
field.

So you have to create a unique ID before you send your doc to Curl. I'm
pretty sure you
can specify literal.ID=youruniqueidhere. See:
http://wiki.apache.org/solr/ExtractingRequestHandler#Literals

<http://wiki.apache.org/solr/ExtractingRequestHandler#Literals>HTH
Erick

On Wed, Oct 6, 2010 at 3:38 AM, Ahson Iqbal <mianah...@yahoo.com> wrote:

> Hi All
>
> I m new to solr extract request handler, i want to index pdf documents but
> when
> i submit document to solr using curl i got following exception
>
>
> Document [Null] missing required field DocID
>
> my curl command is like
>
>
> curl
> "
> http://localhost:8983/solr1/update/extract?literal.DocID=123&fmap.content=Contents&commit=true
> "
>  -F "myfi...@d:/solr/apache-solr-1.4.0/docs/filename1.pdf"
>
> and here is my schema
>
> <fields>
> <field name="DocID" type="string" indexed="true" stored="true"/>
> <field name="Contents" type="text" indexed="true" stored="true"/>
> <dynamicField name="ignored_*" type="ignored" indexed="false"
> stored="false"/>
> </fields>
> <uniqueKey>DocID</uniqueKey>
>
>
> please help me if i m missing something
>
> Regards
> Ahsan
>
>
>

Reply via email to