lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From javaxmlsoapdev <>
Subject Re: ExternalRequestHandler and ContentStreamUpdateRequest usage
Date Tue, 24 Nov 2009 17:32:58 GMT

I was able to configure /docs index separately from my db data index. 

still I am seeing same behavior where it only puts .docName & its size in
the "content" field (I have renamed field to "content" in this new schema) 

below are the only two fields I have in schema.xml 
<field name="key" type="slong" indexed="true" stored="true" required="true"
<field name="content" type="text" indexed="true" stored="true"

Following is updated code from test case 

File fileToIndex = new File("file.txt"); 

ContentStreamUpdateRequest up = new
up.setParam("literal.key", "8978"); 
up.setParam("literal.docName", "doc123.txt"); 
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true); 
NamedList list = server.request(up); 
assertNotNull("Couldn't upload .txt",list); 
QueryResponse rsp = server.query( new SolrQuery( "*:*") ); 
assertEquals( 1, rsp.getResults().getNumFound() ); 

Also from solr admin UI when I search for "doc123.txt" then only it returns
me following response. not sure why its not indexing file's content into
"content" attribute. 
 <result name="response" numFound="1" start="0"> 
 <arr name="content"> 
  <str /> 
  <long name="key">8978</long> 

Any idea? 


View this message in context:
Sent from the Solr - User mailing list archive at

View raw message