On 8/16/2018 5:23 PM, Hai Shang wrote: > Hi solr-user, > > I got trouble resolving PostgreSQL text array with data import in solr 7.4. > In schema, I tried multiValued with both true and false, also tried > string/strings/text_general, while none of them worked. > > Here is the exception message: > > org.apache.solr.common.SolrException: TransactionLog doesn't know how to > serialize class org.postgresql.jdbc.PgArray; try implementing > ObjectResolver?
The JDBC driver is returning an object type that the dataimport handler does not know how to handle. It's a special postgres type. Instead of silently ignoring that data, it has chosen to thrown an error so that you know there's something it can't handle. You're going to need to ask the Postgres people for the proper SQL syntax to turn that column into a string instead of an array object, and then the Solr config is going to need either a RegexTransformer in DIH or some kind of analysis in your schema that can split the string into separate parts. Alternately, you could create a custom transformer for DIH that knows how to handle that object type and can adjust the document that DIH is building. Thanks, Shawn