Based on the error message I think you want to use "literal._uniqueid" not "
literal.id". Your schema which possibly no longer has a field named "id" is
requiring a field name "_uniqueid".

See
https://solr.apache.org/guide/8_11/uploading-data-with-solr-cell-using-apache-tika.html#using-literals-to-define-custom-metadata
for more details, but the basic point is that literal.foobar=baz will put
the field "foobar" in your document with the value "baz". Thus literal.id
is not special, it's just adding a field named "id" which is not sufficient
for your schema

-Gus

On Tue, Jul 12, 2022 at 4:22 PM Nicolas Alejandro Slavik <
nicolas.a.sla...@gmail.com> wrote:

> Hi - I am trying to index files such as html and pdf. I got the following
> error related to unique id which is defined in the curl command. The unique
> id is set with the literal.id parameter.
>
> Can you please help? I read all the documentation of SOLR Cell and tika,
> and I am doing the steps as its described.
>
> Here is what I enter in the cmd.
>
> C:\>*curl
> "
> https://localhost:8984/solr/XP0_Slavik_web_index/update/extract?literal.id=doc1?commit=true
> <
> https://localhost:8984/solr/XP0_Slavik_web_index/update/extract?literal.id=doc1?commit=true
> >"
> -F "myfile=@example.pdf"*
> {
>   "responseHeader":
> {     "status":400,     "QTime":55}
>
> ,
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.common.SolrException"],
>     "msg":"*Document is missing mandatory uniqueKey field: _uniqueid*",
>     "code":400}}
>


-- 
http://www.needhamsoftware.com (work)
http://www.the111shift.com (play)

Reply via email to