You might consider an update request processor as an alternative. It runs on the server and might be simpler. You can even use the stateless script update processor to avoid having to write any custom Java code.

-- Jack Krupansky

-----Original Message----- From: T. Kuro Kurosaka
Sent: Tuesday, May 27, 2014 4:56 PM
To: 'solr-user@lucene.apache.org'
Subject: Any Solrj API to obtain field list?

I'd like to write Solr client code that writes text to language specific
field, say, myfield_es, for Spanish,
if the field myfield_es is defined in schema.xml, and otherwise to a
fall-back field myfield. To do this,
I need to obtain a list of defined fields (and dynamic fields) from the
server. But I cannot find
a suitable Solrj API. Is there any? I'm using Solr 4.6.1. I could write
code to use Schema REST API
(https://wiki.apache.org/solr/SchemaRESTAPI) but I would much prefer to use
the existing code if one exists.

--
T. "Kuro" Kurosaka • Senior Software Engineer

Reply via email to