Re: help with DIH transformer to add a suffix to column names

2016-08-25 Thread Wendy
Hi Alex, Thank you for your response. It worked. I am very happy for the results. I reports the steps below. The purpose is to create a dynamic field to simplify field definition in managed-schema file and to simplify field rank in solrconfig.xml file. STEPS: 1. file creation of db-data-config.x

Re: help with DIH transformer to add a suffix to column names

2016-08-23 Thread Wendy
Hi Alex, It worked out kindly. I have to specify table column names. Using customer transformer allowed me to change column name to _stem. In this way, it simplifies field ranking in solrconfig.xml file and simplifies field

Re: help with DIH transformer to add a suffix to column names

2016-08-23 Thread Alexandre Rafalovitch
I am still not sure it is the right approach. As opposed to managed schema, etc. But... If you add dynamic field * it will accept any field. And DIH test for skipping fields unknown in schema during automatic name matching should probably accept it. Do that as step one, see that you get fields w

Re: help with DIH transformer to add a suffix to column names

2016-08-23 Thread Wendy
Hi Emir,I have many tables and columns to index. One of the requirements is to dynamically index columns without knowing column names. In this way, if a new column is added later on, we don't need to change the configurations, just need to do a delta-imput.I did use Solr with mongodb and mongo-conn

Re: help with DIH transformer to add a suffix to column names

2016-08-23 Thread Emir Arnautovic
Hi Wendy, Why don't you simply specify column names in your query? Do you have that much columns that "SELECT *" is THE way to go? For the transformer - you changed the row, but fields in context are still using old names - maybe try setting field names in context (if possible - did not look

Re: help with DIH transformer to add a suffix to column names

2016-08-22 Thread Wendy
Hi Emlr, I use the example of "A General TrimTransformer" in the following link: https://wiki.apache.org/solr/DIHCustomTransformer#transformer But instead of trim the field value, I wanted to change the table column name to columnName_stem. So I can use *_stem to copy all fields. Here is my c

Re: help with DIH transformer to add a suffix to column names

2016-08-22 Thread Wendy
Hi Alex,Thank you for your response. I include the details below. Hope it makes more clear. I wanted to append _stem to each column name, so I can specify fields dynamically with *_stem w/o specifying each field names.Thanks!I use solr 6.1.0 to index data from mysql database.I wrote a java class o

Re: help with DIH transformer to add a suffix to column names

2016-08-22 Thread Emir Arnautovic
Hi Wendy, It seems to me that you misunderstood concept of dynamic fields. It is something that is defined in Solr schema, e.g. *_text, and then in your DIH config you define fields that match that pattern, e.g. name_text, desc_text etc. HTH, Emir On 20.08.2016 00:58, Alexandre Rafalovitch

Re: help with DIH transformer to add a suffix to column names

2016-08-19 Thread Alexandre Rafalovitch
Can you give an example of what SQL column name and what Solr field name you want correspondingly. Because 'name_*' is not a valid field name. Also, why specifically you are doing this. Regards, Alex On 20 Aug 2016 6:04 AM, "Wendy" wrote: Hi,How can I append a suffix _* to all column nam