Question

Problem:

A Table in MySQL that has a few normal fields and one text field that holds XML

I need to use Solr Data Import Handler to process this table into a Solr Index.
However, the XML field needs to be parsed into several other solr fields each

Question:

  1. Is it possible to do this without having to write a custom Transformer? If yes how. Can I use XPathEntityProcessor with a my SQL DB as datasource?

  2. If I write a custom transformer, how exactly do I configure it in dataConfig?

  3. I am using older version of solr (1.4.1), so can I just drop a new jar with new class into my solr web-app?

The thing I am quite unsure about is how I need to configure the data-config.xml to do this. If anyone has any examples, please share! Thanks.

Was it helpful?

Solution

My suggestion is to write a program which selects the data from the database, parses the XML data field and then inserts the entire document into the SOLR index.

The solrj Java apis are really easy to use. The hardest part of this is parsing the XML, but it's a far easier challenge and easier to test.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top