You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bernd Fehling <be...@uni-bielefeld.de> on 2011/01/07 13:45:03 UTC
DIH Transformer
Hi list,
currently the Transformers return row but can I skip
or drop a row from the Transformer?
If so, what should I return in that case, an empty row?
Regards,
Bernd
Re: DIH Transformer
Posted by Gora Mohanty <go...@mimirtech.com>.
On Fri, Jan 7, 2011 at 6:15 PM, Bernd Fehling
<be...@uni-bielefeld.de> wrote:
> Hi list,
>
> currently the Transformers return row but can I skip
> or drop a row from the Transformer?
[...]
I presume that you are referring to a ScriptTransformer.
Just do not return anything, e.g.,you can make the return
of a row conditional on some value:
function skipRow( row ) {
if( row.get( 'hidden' ) == 'hidden' ) {
return row;
}
}
This would not index any rows that have a column "hidden"
with the value "hidden".
Regards,
Gora