0

I'm using SolrJ 6.2.1 and trying to create a document on the WebSolr index but I keep getting the following error when I try to add the document to the index.

Error: Error from server at https://index.websolr.com/solr/XXXXXXX: Invalid UTF-8 middle byte 0xe0 (at char #1, byte #-1)

Here's the SolrJ code that I've written to create the Index:

String urlString = "https://index.websolr.com/solr/a056f416ce0";
SolrClient solr = new HttpSolrClient.Builder(urlString).build();

SolrInputDocument document = new SolrInputDocument();
document.addField("id", "552199");

UpdateResponse response = solr.add(document);

solr.commit();

I'm also using the "customized" index type in WebSolr when setting up the index initially.

Any ideas what I maybe doing wrong here?

Thanks,

Sangram Shivankar
  • 3,535
  • 3
  • 26
  • 38
  • See https://stackoverflow.com/questions/6352861/jackson-jsonparseexception-invalid-utf-8-middle-byte – Raedwald Aug 23 '18 at 08:09

2 Answers2

0

Figured this one out.

At this time WebSolr requires you to be on SolrJ 3.6.1 for your client app to query or index it.

0

With an HTTP GET request to:

https://index.websolr.com/solr/admin/info/system

with the admin/passwd you can retrieve the server configuration, the lucene key of the structure contains version numbers.

For example, using json output:

https://index.websolr.com/solr/admin/info/system?wt=json

lucene: {
   solr-spec-version: "4.10.2",
   solr-impl-version: "4.10.2 1634293 - mike - 2014-10-26 05:56:21",
   lucene-spec-version: "4.10.2",
   lucene-impl-version: "4.10.2 1634293 - mike - 2014-10-26 05:51:56"
}

So you should use SolrJ ver. 4.10.2

freedev
  • 25,946
  • 8
  • 108
  • 125