You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2008/01/14 21:35:28 UTC

unique ID question

If I make one of my field as a unique ID, id doesn't increase/decrease performance of searching by this field. Right?
For example if I have two fields, I know for sure both of them are unique, both the same type, and make one of them as a Solr Unique ID. The general performance should be the same if I want to retrieve a document by first field or by the second.
Am I correct? Any general ideas or comments on this topic would be helpful to better understand how unique ID works.
 
Thank you
Gene

Re: unique ID question

Posted by Ryan McKinley <ry...@gmail.com>.
Evgeniy Strokin wrote:
> If I make one of my field as a unique ID, id doesn't increase/decrease performance of searching by this field. Right?
> For example if I have two fields, I know for sure both of them are unique, both the same type, and make one of them as a Solr Unique ID. The general performance should be the same if I want to retrieve a document by first field or by the second.
> Am I correct? Any general ideas or comments on this topic would be helpful to better understand how unique ID works.
>  

correct - search performance only depends on the lucene index 
characteristics.

The field you declare as: <uniqueKey>id</uniqueKey> is just a marker to 
solr to say what field it should use to check if the document overwrites 
another one.

 From the searching side, there is nothing special about the uniqueKey 
field, it is only for /update that it gets used.

ryan