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 jcott28 <jc...@yahoo.com> on 2009/05/11 19:15:00 UTC

Disable unique-key for Solr index

I have a case where I would like a solr index created which disables the
unique-key option.

I've tried commenting out the  <uniqueKey> option and that just spits out an
error:

SEVERE: org.apache.solr.common.SolrException: QueryElevationComponent
requires the schema to have a uniqueKeyField


I've tried something like this : <uniqueKey required="false"></uniqueKey>

Nothing seems to do the trick.

The problem with a unique key is that the uniqueness for my results are
actually based on all the fields in my document.  There isn't one specific
field which is unique.  All the fields combined are unique though (they are
taken directly from a View inside an RDBMS whose primary key is all of the
columns).

Any help would be greatly appreciated!

Thanks,
  Jeff

-- 
View this message in context: http://www.nabble.com/Disable-unique-key-for-Solr-index-tp23487249p23487249.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Disable unique-key for Solr index

Posted by Jérôme Etévé <je...@gmail.com>.
Hi !

  Is there any " primary table " in your view with a unique single key
you could use ?

J.

2009/5/11 jcott28 <jc...@yahoo.com>:
>
> I have a case where I would like a solr index created which disables the
> unique-key option.
>
> I've tried commenting out the  <uniqueKey> option and that just spits out an
> error:
>
> SEVERE: org.apache.solr.common.SolrException: QueryElevationComponent
> requires the schema to have a uniqueKeyField
>
>
> I've tried something like this : <uniqueKey required="false"></uniqueKey>
>
> Nothing seems to do the trick.
>
> The problem with a unique key is that the uniqueness for my results are
> actually based on all the fields in my document.  There isn't one specific
> field which is unique.  All the fields combined are unique though (they are
> taken directly from a View inside an RDBMS whose primary key is all of the
> columns).
>
> Any help would be greatly appreciated!
>
> Thanks,
>  Jeff
>
> --
> View this message in context: http://www.nabble.com/Disable-unique-key-for-Solr-index-tp23487249p23487249.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
Jerome Eteve.

Chat with me live at http://www.eteve.net

jerome@eteve.net

Re: Disable unique-key for Solr index

Posted by jcott28 <jc...@yahoo.com>.
Man, I hadn't even thought of that!  Now I feel like an idiot! Thanks!


Erik Hatcher wrote:
> 
> If you're not using it, remove the QueryElevationComponent from  
> solrconfig.xml
> 
> 	Erik
> 
> 
> On May 11, 2009, at 1:15 PM, jcott28 wrote:
> 
>>
>> I have a case where I would like a solr index created which disables  
>> the
>> unique-key option.
>>
>> I've tried commenting out the  <uniqueKey> option and that just  
>> spits out an
>> error:
>>
>> SEVERE: org.apache.solr.common.SolrException: QueryElevationComponent
>> requires the schema to have a uniqueKeyField
>>
>>
>> I've tried something like this : <uniqueKey required="false"></ 
>> uniqueKey>
>>
>> Nothing seems to do the trick.
>>
>> The problem with a unique key is that the uniqueness for my results  
>> are
>> actually based on all the fields in my document.  There isn't one  
>> specific
>> field which is unique.  All the fields combined are unique though  
>> (they are
>> taken directly from a View inside an RDBMS whose primary key is all  
>> of the
>> columns).
>>
>> Any help would be greatly appreciated!
>>
>> Thanks,
>>  Jeff
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Disable-unique-key-for-Solr-index-tp23487249p23487249.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Disable-unique-key-for-Solr-index-tp23487249p23488459.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Disable unique-key for Solr index

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
If you're not using it, remove the QueryElevationComponent from  
solrconfig.xml

	Erik


On May 11, 2009, at 1:15 PM, jcott28 wrote:

>
> I have a case where I would like a solr index created which disables  
> the
> unique-key option.
>
> I've tried commenting out the  <uniqueKey> option and that just  
> spits out an
> error:
>
> SEVERE: org.apache.solr.common.SolrException: QueryElevationComponent
> requires the schema to have a uniqueKeyField
>
>
> I've tried something like this : <uniqueKey required="false"></ 
> uniqueKey>
>
> Nothing seems to do the trick.
>
> The problem with a unique key is that the uniqueness for my results  
> are
> actually based on all the fields in my document.  There isn't one  
> specific
> field which is unique.  All the fields combined are unique though  
> (they are
> taken directly from a View inside an RDBMS whose primary key is all  
> of the
> columns).
>
> Any help would be greatly appreciated!
>
> Thanks,
>  Jeff
>
> -- 
> View this message in context: http://www.nabble.com/Disable-unique-key-for-Solr-index-tp23487249p23487249.html
> Sent from the Solr - User mailing list archive at Nabble.com.