--- On Fri, 7/13/12, stockii <stock.jo...@googlemail.com> wrote:

> From: stockii <stock.jo...@googlemail.com>
> Subject: DIH include Fieldset in query
> To: solr-user@lucene.apache.org
> Date: Friday, July 13, 2012, 11:42 AM
> hello..
> 
> i have many big entities in my data-config.xml. in the many
> entities is the
> same query.
> the entities look like this:
> 
> <entity name="name" transformer="DateFormatTransformer"
> pk="id"
> query="
> SELECT 
>  field as fielname,
>  IF(bla NOT NULL, 1, 0) AS blob,
>  fieldname,
>  fieldname AS field, ...
>  
> 
> more and more.
> 
> is it possible to include text from a file or something like
> this, in
> data-config.xml???

So you want to re-use same SQL sentence in many entities? 
I think you can do it with :

http://wiki.apache.org/solr/DataImportHandler#Custom_Functions

<entity 
query="'${dataimporter.functions.myFunction(dataimporter.request.user)'">

Reply via email to