Well, merging from different tables (using pk's, etc. ) is pretty clear from
the Wiki (nice work)
However the difficult part:  currently I have a table called availabilities,
and product (all simplified)
-------------------
| availabilities
-----------------
|productid    k
|factid          k
|providerid   k
|value
--------------------

Each row in this table represents a temporal availability of 1 product of 1
provider. An availability is unique by combination of fields:
productid-providerid-factid.

However the row / document in SOlr needs to represent a product.  I want to
merge these productavailabilities in such a way with product that a product
document contains (among other fields) a field for each 'fact'. The value
for such a fact-field  contains the value of availability.value of the
'best' availability found under constraints productid and factid. 

Note that: 
-there are a lot of facts (resulting in a lot of fact-columns --> 1,000 +) 
-fact-fields are defined as dynamic fields, since possible facts are not
known at design-time.
- I want to use a custom Transformer to calculate what is the 'best'
availability given the factid, productid. 

Currently I have a more or less working home-grown solution, but I would
like to be able to set it up with DataImportHandler. 

thanks for your help,
Britske



Noble Paul നോബിള്‍ नोब्ळ् wrote:
> 
> What is the basis on which you merge rows ? Then I may be able to
> suggest an easy way of doing that
> 
> 
> On Sun, Sep 28, 2008 at 3:17 AM, Britske <[EMAIL PROTECTED]> wrote:
>>
>> Looking at the wiki, code of DataImportHandler and it looks impressive.
>> There's talk about ways to use Transformers to be able to create several
>> rows (solr docs) based on a single db row.
>>
>> I'd like to know if it's possible to do the exact opposite: to build
>> customer transformers that take multiple db-rows and merge it to a single
>> solr-row/document. If so, how?
>>
>> Thanks,
>> Britske
>> --
>> View this message in context:
>> http://www.nabble.com/DataImportHandler%3A-way-to-merge-multiple-db-rows-to-1-doc-using-transformer--tp19706722p19706722.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> --Noble Paul
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataImportHandler%3A-way-to-merge-multiple-db-rows-to-1-doc-using-transformer--tp19706722p19722396.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to