Re: solr: adding a string on to a field via DIH
Thanks guys. I had taken a quick look at the Template Transformer and it looks it does what I need it to dodidn't see the 'hello' part when reviewing earlier. On Sat, May 5, 2012 at 11:47 AM, Jack Krupansky wrote: > Sounds like you need a "Template Transformer": "... it helps to > concatenate multiple values or add extra characters to field for injection." > > > > ... > > > See: > http://wiki.apache.org/solr/**DataImportHandler#**TemplateTransformer<http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer> > > Or did you have something different in mind? > > -- Jack Krupansky > > -Original Message- From: okayndc > Sent: Saturday, May 05, 2012 9:12 AM > To: solr-user@lucene.apache.org > Subject: solr: adding a string on to a field via DIH > > > Hello, > > Is it possible to concatenate a field via DIH? > For example for the id field, in order to make it unique > I want to add 'project' to the beginning of the id field. > So the field would look like 'project1234' > Is this possible? > > > > Thanks >
Re: solr: adding a string on to a field via DIH
Sounds like you need a "Template Transformer": "... it helps to concatenate multiple values or add extra characters to field for injection." ... See: http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer Or did you have something different in mind? -- Jack Krupansky -Original Message- From: okayndc Sent: Saturday, May 05, 2012 9:12 AM To: solr-user@lucene.apache.org Subject: solr: adding a string on to a field via DIH Hello, Is it possible to concatenate a field via DIH? For example for the id field, in order to make it unique I want to add 'project' to the beginning of the id field. So the field would look like 'project1234' Is this possible? Thanks
Re: solr: adding a string on to a field via DIH
There might be a Solr way of accomplishing this, but I've always done stuff like this in SQL (i.e. the CONCAT command). Doing it a Solr-native way would probably be better in terms of bandwidth consumption, but just giving you that option early in case there's not a better one. Michael On Sat, 2012-05-05 at 09:12 -0400, okayndc wrote: > Hello, > > Is it possible to concatenate a field via DIH? > For example for the id field, in order to make it unique > I want to add 'project' to the beginning of the id field. > So the field would look like 'project1234' > Is this possible? > > > > Thanks
solr: adding a string on to a field via DIH
Hello, Is it possible to concatenate a field via DIH? For example for the id field, in order to make it unique I want to add 'project' to the beginning of the id field. So the field would look like 'project1234' Is this possible? Thanks