Folks,
Template transformer will fail to return if a variable if undefined,
however the regex transformer does still return. So where the
following would fail:-
This can be used instead:-
So I guess we have the best of both worlds!
Fergus.
>Hmmm. Just gave that a go! No luck
>But how many
On Fri, Feb 13, 2009 at 11:04 AM, Erik Hatcher
wrote:
> What about having the template transformer support ${field:default} syntax?
this is the only usecase for this. this can be easily achieved with a
custom Transformer
> I'm assuming it doesn't support that currently right? The replace stuff
On Fri, Feb 13, 2009 at 10:17 AM, Fergus McMenemie wrote:
> Paul,
>
> Following up your usenet sussgetion:
>
> ignoreMissingVariables="true"/>
>
> and to add more to what I was thinking...
>
> if the field is undefined in the input document, but the schema.xml
> does allow a default value, then
Hmmm. Just gave that a go! No luck
But how many layers of defaults do we need?
Rgds Fergus
>What about having the template transformer support ${field:default}
>syntax? I'm assuming it doesn't support that currently right? The
>replace stuff in the config files does though.
>
> Erik
What about having the template transformer support ${field:default}
syntax? I'm assuming it doesn't support that currently right? The
replace stuff in the config files does though.
Erik
On Feb 13, 2009, at 8:17 AM, Fergus McMenemie wrote:
Paul,
Following up your usenet sussgeti
Paul,
Following up your usenet sussgetion:
and to add more to what I was thinking...
if the field is undefined in the input document, but the schema.xml
does allow a default value, then TemplateTransformer can use the
default value. If there is no default value defined in schema.xml
then it
>Hello,
>
>templatetransformer behaves rather ungracefully if one of the replacement
>fields is missing.
Looking at TemplateString.java I see that left to itself fillTokens would
replace a missing variable with "". It is an extra check in TemplateTransformer
that is throwing the warning and stopp
the intent was to not to make a partial string if some of the variable
are missing
probably we can enhance TemplateTransformer by using an extra
attribute on the field
then it can just resolve with whatever is available...
On Fri, Feb 13, 2009 at 3:17 PM, Fergus McMenemie wrote:
> Hello,
>
Hello,
templatetransformer behaves rather ungracefully if one of the replacement
fields is missing.
I am parsing a single XML document into multiple separate solr documents.
It turns out that none of the source documents fields can be used to create
a uniqueKey alone. I need to combine two, using