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 "Dhutia, Devansh" <DD...@gannett.com> on 2015/11/13 19:00:55 UTC

DocValues error

We have an existing collection with a field called lastpublishdate of type tdate. It already has a lot of data indexed, and we want to add docValues to improve our sorting performance on the field.

The old field definition was:

 <field name="lastpublishdate" type="tdate" indexed="true" stored=“true"/>

We we recently changed it to

 <field name="lastpublishdate" type="tdate" indexed="true" stored="true" docValues="true"/>

Is that considered a breaking change? Upon deploying the schema & reloading the collection, sorting on the field fails the following error:

unexpected docvalues type NONE for field 'lastpublishdate' (expected=NUMERIC). Use UninvertingReader or index with docvalues.

Do we really need to wipe & rebuild the entire index to add docValues to an existing dataset?

Thanks

Re: DocValues error

Posted by "Dhutia, Devansh" <DD...@gannett.com>.
Ugh! I totally missed the highlight. 

Thanks for clarifying. 




On 11/13/15, 1:07 PM, "Anshum Gupta" <an...@anshumgupta.net> wrote:

>Hi Devansh,
>
>Yes you'd need to reindex your data in order to use DocValues. It's
>highlighted here @ the official ref guide :
>
>https://cwiki.apache.org/confluence/display/solr/DocValues
>
>On Fri, Nov 13, 2015 at 10:00 AM, Dhutia, Devansh <DD...@gannett.com>
>wrote:
>
>> We have an existing collection with a field called lastpublishdate of type
>> tdate. It already has a lot of data indexed, and we want to add docValues
>> to improve our sorting performance on the field.
>>
>> The old field definition was:
>>
>>  <field name="lastpublishdate" type="tdate" indexed="true" stored=“true"/>
>>
>> We we recently changed it to
>>
>>  <field name="lastpublishdate" type="tdate" indexed="true" stored="true"
>> docValues="true"/>
>>
>> Is that considered a breaking change? Upon deploying the schema &
>> reloading the collection, sorting on the field fails the following error:
>>
>> unexpected docvalues type NONE for field 'lastpublishdate'
>> (expected=NUMERIC). Use UninvertingReader or index with docvalues.
>>
>> Do we really need to wipe & rebuild the entire index to add docValues to
>> an existing dataset?
>>
>> Thanks
>>
>
>
>
>-- 
>Anshum Gupta

Re: DocValues error

Posted by Anshum Gupta <an...@anshumgupta.net>.
Hi Devansh,

Yes you'd need to reindex your data in order to use DocValues. It's
highlighted here @ the official ref guide :

https://cwiki.apache.org/confluence/display/solr/DocValues

On Fri, Nov 13, 2015 at 10:00 AM, Dhutia, Devansh <DD...@gannett.com>
wrote:

> We have an existing collection with a field called lastpublishdate of type
> tdate. It already has a lot of data indexed, and we want to add docValues
> to improve our sorting performance on the field.
>
> The old field definition was:
>
>  <field name="lastpublishdate" type="tdate" indexed="true" stored=“true"/>
>
> We we recently changed it to
>
>  <field name="lastpublishdate" type="tdate" indexed="true" stored="true"
> docValues="true"/>
>
> Is that considered a breaking change? Upon deploying the schema &
> reloading the collection, sorting on the field fails the following error:
>
> unexpected docvalues type NONE for field 'lastpublishdate'
> (expected=NUMERIC). Use UninvertingReader or index with docvalues.
>
> Do we really need to wipe & rebuild the entire index to add docValues to
> an existing dataset?
>
> Thanks
>



-- 
Anshum Gupta