/update/extract error

2013-07-22 Thread franagan
Hi all,

im testing solrcloud (version 4.3.1) with 2 shards and 1 external zookeeper.
All its runing ok, documents are indexing in 2 diferent shards and select
*:* give me all documents.

Now im trying to add/index a new document via solj ussing CloudSolrServer. 

the code:

CloudSolrServer server = new CloudSolrServer("localhost:2181");
server.setDefaultCollection("tika");


ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest("/update/extract");
up.addFile(new File("C:\\sample.pdf"), "application/octet-stream");
up.setParam("literal.id", "666");   

server.request(up);
server.commit();

when up.setParam("literal.id", "666");, a exception is thown:

*apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: ERROR:
[doc=66
6] unknown field 'ignored_dcterms:modified'*
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServ
er.java:402)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServ
er.java:180)
at
org.apache.solr.update.SolrCmdDistributor$1.call(SolrCmdDistributor.j
ava:401)
at
org.apache.solr.update.SolrCmdDistributor$1.call(SolrCmdDistributor.j
ava:375)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:43
9)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:918)
at java.lang.Thread.run(Thread.java:662)


My schema looks like this:
 

   
   
  
 
 

my solrConfig.xml:

  
 
  last_modified
  ignored_


  -MM-dd

  

i have already activate /admin/luke check the schema, no dcterms:modified
field in the response only the corrects fields declared in schema.xml

Can someone help me with this issue?

Thanks in advance. 









--
View this message in context: 
http://lucene.472066.n3.nabble.com/update-extract-error-tp4079555.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: /update/extract error

2013-07-22 Thread franagan
I added   to the schema.xml and now its working. 
*
Thank you very much Jack. *





--
View this message in context: 
http://lucene.472066.n3.nabble.com/update-extract-error-in-Solr-4-3-1-tp4079555p4079564.html
Sent from the Solr - User mailing list archive at Nabble.com.


socket write error Solrj 4.3.1

2013-07-23 Thread franagan
Hi all,

im testing solrcloud (version 4.3.1) with 2 shards and 1 external zookeeper.
All its runing ok, documents are indexing in 2 diferent shards and select
*:* give me all documents.

Now im trying to add/index a new document via solj ussing CloudSolrServer.

*the code:*

server = new CloudSolrServer("localhost:2181");
server.setDefaultCollection("tika");
server.setZkConnectTimeout(9);  

input = new FileInputStream(new File("C:\\sample.pdf"));

ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest("/update/extract");
up.addFile(new File("C:\\caca.pdf"), 
"application/octet-stream");
up.setParam("literal.id", "444");


Parser parser = new PDFParser();
ContentHandler handler = new BodyContentHandler();
Metadata metadata = new Metadata();
ParseContext context = new ParseContext();
parser.parse(input, handler, metadata, context);

up.setParam("literal.text",handler.toString());
up.setMethod(SolrRequest.METHOD.POST);

server.request(up);
server.commit();
input.close();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SolrServerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

*My schema looks like this:*
 
 
   
   
  
   
   
 

*where text_ind type is like this:*
  







*when i execute code next exception is thrown:*

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
org.apache.solr.client.solrj.SolrServerException: No live SolrServers
available to handle this
request:[http://192.168.1.12:8983/solr/tika_shard1_replica1,
http://192.168.1.12:8984/solr/tika_shard2_replica1]
at
org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:333)
at
org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:306)
at solrCloud.solrJDemo.main(solrJDemo.java:51)
Caused by: org.apache.solr.client.solrj.SolrServerException: IOException
occured when talking to server at:
http://192.168.1.12:8983/solr/tika_shard1_replica1
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:413)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180)
at
org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:264)
... 2 more
Caused by: org.apache.http.client.ClientProtocolException
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:909)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:352)
... 4 more
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot
retry request with a non-repeatable request entity.  The cause lists the
reason the original request failed.
at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:691)
at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
... 7 more
Caused by: java.net.SocketException: Software caused connection abort:
socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at
org.apache.http.impl.io.AbstractSessionOutputBuffer.flushBuffer(AbstractSessionOutputBuffer.java:147)
at
org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:167)
at
org.apache.http.impl.conn.LoggingSessionOutputBuffer.write(LoggingSessionOutputBuffer.java

Re: socket write error Solrj 4.3.1

2013-07-23 Thread franagan
For people who have same issue, solved solved adding:

text

in the requestHandler /update/extract" in solrconfig.xml:

  
 
  last_modified
  ignored_
 * text*


  -MM-dd

  

So no need to add content in solrj:

p.setParam("literal.text",handler.toString());

Regards



--
View this message in context: 
http://lucene.472066.n3.nabble.com/socket-write-error-Solrj-4-3-1-tp4079869p4079881.html
Sent from the Solr - User mailing list archive at Nabble.com.