Although I'd really recommend using underscore rather than hyphen,
since '-' is a query operator and it'll mess you up *sometime* <G>...

 Best
Erick

On Fri, Aug 26, 2011 at 8:43 AM, Erik Hatcher <erik.hatc...@gmail.com> wrote:
> Vighnesh -
>
> What you're looking for is DataImportHandler's TemplateTransformer.  Docs 
> here: <http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer>
>
> Basically just enable the TemplateTransformer in each of your DIH configs 
> then set a literal field value like this differently for each source:
>
>   <field column="datasource" template="datasource-1" />
>
> Be sure you have a datasource (string field type) field in your schema.  
> Reindex.
>
> Then you can fq=datasource:datasource-1 and facet on it and so on since it is 
> a normal field on all documents.
>
>        Erik
>
> On Aug 26, 2011, at 05:41 , vighnesh wrote:
>
>> hi all
>>
>> I have a two data sources in data-config file and i need data from first
>> datasource , second datasource and from both .how can acheive this in solr
>> query.
>>
>> example like: first datasource:
>>
>> http://localhost:8983/solr/db/select/?q=newthread&version=2.2&start=0&rows=200&indent=on&datasource=datasource-1
>>
>> example like: second datasource:
>>
>> http://localhost:8983/solr/db/select/?q=newthread&version=2.2&start=0&rows=200&indent=on&datasource=datasource-1
>>
>> example like: both datasources:
>>
>> http://localhost:8983/solr/db/select/?q=newthread&version=2.2&start=0&rows=200&indent=on&datasource=datasource-1&datasource=datasource-1
>>
>> is this querys are correct or not ? plese let me know that.
>>
>>
>> thanks in advance.
>>
>> --
>> View this message in context: 
>> http://lucene.472066.n3.nabble.com/how-to-differentiate-multiple-datasources-when-building-solr-query-tp3286309p3286309.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Reply via email to