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 Chris Hostetter <ho...@fucit.org> on 2009/03/24 22:50:40 UTC

Re: Trivial question: request for id when indexing using CURL & ExtractingRequestHandler

Deja-Vu...

http://www.nabble.com/Missing-required-field%3A-id-Using-ExtractingRequestHandler-to22611039.html

: I'm performing this operation:
: 
: curl http://localhost:8983/solr/update/extract?ext.def.fl=text --data-binary
: @ZOLA.doc -H 'Content-type:text/html'
: 
: in order to index word document ZOLA.doc into Solr using the example
: schema.xml. It says I have not provided an 'id', which is a required field.
: I'm not sure how (syntactically) to provide the id- should it be part of the
: query string? And if so, how?


-Hoss


Re: Trivial question: request for id when indexing using CURL & ExtractingRequestHandler

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
If your text field is not stored, then it won't be available in  
results.  That's the likely explanation.  Seems like all is well.

	Erik

On Mar 24, 2009, at 11:34 PM, Chris Muktar wrote:

> Fantastic thank you!
>
> I'm executing this:
> curl -F "text=@Zheng.doc" -F 'commit=true'
> http://localhost:8983/solr/update/extract?ext.def.fl=text 
> \&ext.literal.id=2
>
> however performing the query
> http://localhost:8983/solr/select?q=id:2
>
> produces the output but without a text field. I'm not sure if it's  
> being
> extracted & indexed correctly. The commit is going through though.  
> This is
> using the example schema. Any thoughts? XML response follows...
>
> <response>
> -
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">2</int>
> -
> <lst name="params">
> <str name="q">id:2</str>
> </lst>
> </lst>
> -
> <result name="response" numFound="1" start="0">
> -
> <doc>
> <str name="id">2</str>
> <int name="popularity">0</int>
> <str name="sku">2</str>
> <date name="timestamp">2009-03-24T22:27:00.714Z</date>
> </doc>
> </result>
> </response>


Re: Trivial question: request for id when indexing using CURL & ExtractingRequestHandler

Posted by Chris Muktar <ch...@wikijob.co.uk>.
Fantastic thank you!

I'm executing this:
curl -F "text=@Zheng.doc" -F 'commit=true'
http://localhost:8983/solr/update/extract?ext.def.fl=text\&ext.literal.id=2

however performing the query
http://localhost:8983/solr/select?q=id:2

produces the output but without a text field. I'm not sure if it's being
extracted & indexed correctly. The commit is going through though. This is
using the example schema. Any thoughts? XML response follows...

<response>
-
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">2</int>
-
<lst name="params">
<str name="q">id:2</str>
</lst>
</lst>
-
<result name="response" numFound="1" start="0">
-
<doc>
<str name="id">2</str>
<int name="popularity">0</int>
<str name="sku">2</str>
<date name="timestamp">2009-03-24T22:27:00.714Z</date>
</doc>
</result>
</response>