cancel
Showing results for 
Search instead for 
Did you mean: 

SolrException

mrgrechkinn
Champ in-the-making
Champ in-the-making
Hello,

I create Java webscript, and use SolrServer.

UpdateRequest request = new UpdateRequest();
SolrInputDocument doc= new SolrInputDocument();
doc.addField("ID", "LEAF-1341");
doc.addField("{http://mynamespace.com/0.1}testF", "test");
request.add(doc);
try {
        solrServer.request(request);
        solrServer.commit();
} catch (Exception e) {
        throw new RuntimeException(e);
}

But it fall down always  with status message.

"org.apache.solr.common.SolrException: Bad Request\n\nBad Request\n\nrequest: https:\/\/localhost:8443\/solr\/update?wt=javabin&version=1"
,"org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)"

What am I doing wrong?

Regards,
Eugene
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

SOLR needs to know about your model - it will reject properties it does not recognise as it does not know how to index them.

Andy

mrgrechkinn
Champ in-the-making
Champ in-the-making
Thanks Andy.