lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: [jira] Commented: (SOLR-1229) deletedPkQuery feature does not work when pk and uniqueKey field do not have the same value
Date Wed, 24 Jun 2009 10:35:20 GMT

On Jun 24, 2009, at 12:28 AM, Noble Paul (JIRA) wrote:
> let me explain with the above example .
>
> {code:java}
> // this code is  taken from your patch
> SchemaField uniqueKeyField =  
> dataImporter.getSchema().getUniqueKeyField();
> // now the value of uniqueKeyField is 'solr_id'
> if (uniqueKeyField == null) return;
> Object key = map.get(uniqueKeyField.getName());
> //the map contains {"db_id"-> "12345"}
> //so key == null; and it will do nothing and return
> // on the contrary if you set the pk="db_id" , then it works

But... since transformations are applied, solr_id will be in that map  
too, which is the uniqueKey value.  Problem solved!  :)

	Erik


Mime
View raw message