lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: CSV Update - Need help mapping csv field to schema's ID
Date Wed, 16 Sep 2009 13:41:25 GMT

On Sep 15, 2009, at 8:25 PM, Yonik Seeley wrote:

>> : .map={sku.field}:{id}
>>
>> the map param is for replacing a *value* with a different'  
>> value ... it's
>> useful for things like numeric codes in CSV files that you want to  
>> replace
>> with strings in your index.
>
> Darn... I shouldn't trust my memory.
> From http://issues.apache.org/jira/browse/SOLR-284
> '''drop "ext." from parameter names, and revisit naming to try and
> unify with other update handlers like CSV'''
>
> So now map.a=b in CSV is for values but map.a=b in SolrCell is for  
> fields....
> perhaps we should change map in SolrCell to fmap?

That's fine by me.  Just update the docs when you're done.

>
> My longer range idea was to pull out some generally useful things like
> field mapping, etc, such that they could be shared across update
> handlers.

See also:
  SOLR-1032, SOLR-1069 for related things.  We should be able to  
refactor the field mapping code easy enough.

>
> -Yonik
> http://www.lucidimagination.com
>
>
> ---------- Forwarded message ----------
> From: Chris Hostetter <hossman_lucene@fucit.org>
> Date: Tue, Sep 15, 2009 at 8:12 PM
> Subject: Re: CSV Update - Need help mapping csv field to schema's ID
> To: solr-user@lucene.apache.org
>
>
>
> : I would like to add an additional name:value pair for every line,  
> mapping the
> : sku field to my schema's id field:
> :
> : .map={sku.field}:{id}
>
> the map param is for replacing a *value* with a different' value ...  
> it's
> useful for things like numeric codes in CSV files that you want to  
> replace
> with strings in your index.
>
> : I would prefer NOT to change the schema by adding a <copyField  
> source="sku"
> : dest="id"/>.
>
> that's the only solution i can think of unless you want to write an
> UpdateProcessor.
>
>
> -Hoss

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


Mime
View raw message