Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by NoblePaul: http://wiki.apache.org/solr/DataImportHandler ------------------------------------------------------------------------------ example: {{{ <entity name="foo" transformer="org.apache.solr.handler.dataimport.RegExpTransformer" - query="select full_name from foo"/> + query="select full_name , emailids from foo"/> ... /> <field column="full_name"/> <field column="firstName" regExp="Mr(\w*)\b.*" sourceColName="full_name"/> - <field column="lastName" regExp="Mr.*?\b(\w*)" sourceColName="full_name"/> + <field column="lastName" regExp="Mr.*?\b(\w*)" sourceColName="full_name"/> + <field column="mailId" splitBy="," sourceColName="emailids"/> </entity> }}} - Here the attributes 'regExp' and 'sourceColName' are custom attributes used by the transformer. It reads the field 'full_name' from the resultset and transform it to two target fields 'firstName' and 'lastName' . So even though the query returned onlyy one column 'full_name' in the resultset the solr document gets two extra fields 'firstName' and 'lastName' wich are 'derived' fields. + Here the attributes 'regExp' and 'sourceColName' are custom attributes used by the transformer. It reads the field 'full_name' from the resultset and transform it to two target fields 'firstName' and 'lastName' . So even though the query returned only one column 'full_name' in the resultset the solr document gets two extra fields 'firstName' and 'lastName' wich are 'derived' fields. + + The 'emailids' field in the table can be a comma separated value. So it ends up giving out one or more than one email ids and we expect the 'mailId' to be a multivalued field in Solr ---- CategorySolrRequestHandler
