On Jun 9, 2011, at 1:27pm, Helmut Hoffer von Ankershoffen wrote:

> Hi,
> 
> ... that would be an option if there is a defined set of field names and a
> single column/CSV layout. The scenario however is different csv files (from
> different shops) with individual column layouts (separators, encodings
> etc.). The idea is to map known field names to defined field names in the
> solr schema. If I understand the capabilities of the CSVLoader correctly
> (sorry, I am completely new to Solr, started work on it today) this is not
> possible - is it?

As per the documentation on http://wiki.apache.org/solr/UpdateCSV#fieldnames, 
you can specify the names/positions of fields in the CSV file, and ignore 
fieldnames.

So this seems like it would solve your requirement, as each different layout 
could specify its own such mapping during import.

It could be handy to provide a fieldname map (versus the value map that 
UpdateCSV supports). Then you could use the header, and just provide a mapping 
from header fieldnames to schema fieldnames.

-- Ken
 
> On Thu, Jun 9, 2011 at 10:12 PM, Yonik Seeley 
> <yo...@lucidimagination.com>wrote:
> 
>> On Thu, Jun 9, 2011 at 4:07 PM, Helmut Hoffer von Ankershoffen
>> <helmut...@googlemail.com> wrote:
>>> Hi,
>>> yes, it's about CSV files loaded via HTTP from shops to be fed into a
>>> shopping search engine.
>>> The CSV Loader cannot map fields (only field values) etc.
>> 
>> You can provide your own list of fieldnames and optionally ignore the
>> first line of the CSV file (assuming it contains the field names).
>> http://wiki.apache.org/solr/UpdateCSV#fieldnames
>> 
>> -Yonik
>> http://www.lucidimagination.com
>> 

--------------------------
Ken Krugler
+1 530-210-6378
http://bixolabs.com
custom data mining solutions






Reply via email to