Solr clobtransfomer

I have been stuck with ClobTransformer in ClobTransformer for the last 3 days. I want to convert oracle clob field to text field in solr. I use several cores and I started my configuration files and schemas from scratch.

This is my configuration file:

 <lib dir="../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" /> <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> 

These are the columns in the kernel schema file:

 <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/> <field name="mandp" type="text_en_splitting" indexed="true" stored="true" multiValued="false" /> 

This is my kernel-config.xml file:

 <dataConfig> <dataSource type="JdbcDataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@***" user="***" password="****"/> <document> <entity name="wiki" transformer="ClobTransformer" query="Select t.id as id, t.mandp From table1 t"> <field column="mandp" name="mandp" clob="true" /> </entity> </document> </dataConfig> 

When I run solr, I see that the dataimporthandler * .jar files have been successfully loaded in the console. When I run my dataimport from http://localhost:8983/solr/wiki/dataimport?command=full-import&clean=false , I see no errors in the console and I see nothing related to the transformer or clob. So, if I enter something into my transformer parameter (transformer = "bla bla bla"), it does not throw any errors in the console, which may mean that my transformer argument is completely ignored or the full log is disabled.

When I request solr, I see oracle.sql.CLOB@375c929a in the mandp field. Of course, nothing happens if I also use the HTMLStripTransformer class. I want to use both fields in this field.

Any ideas are welcome.

+4
source share
2 answers

It seems that ClobTransformer does not start. I personally would change the name of the mandp column inside the query as follows:

 Select t.id as id, t.mandp as mandp From table1 t 
+4
source

add transformer = "ClobTransformer, RegexTransformer" to the object in the data-config.xml file

-1
source

Source: https://habr.com/ru/post/1387263/


All Articles