You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by mtn search <se...@gmail.com> on 2023/06/12 16:24:49 UTC

Solr 6 - unexpected docvalues type NONE for field

Hello,

Any tips as to why this error is occurring? Occurs with query when sorting
on sortableSender or other fields with docvalues set to false.  Plan to
re-index, but would like to better understand this issue.  Why would it
expect "=SORTED" when docvalues is set to false?

<field name="sortableSender" type="icuCollationDefault" indexed="true"
stored="true" multiValued="false" required="false" docValues="false" />

Solr version 6.4.2
<luceneMatchVersion>6.4.0</luceneMatchVersion>

*error":{ "msg":"unexpected docvalues type NONE for field 'sortableSender'
(expected=SORTED). Re-index with correct docvalues type.",
"trace":"java.lang.IllegalStateException: unexpected docvalues type NONE
for field 'sortableSender' (expected=SORTED). Re-index with correct
docvalues type*.\n\tat
org.apache.lucene.index.DocValues.checkField(DocValues.java:212)\n\tat
org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)\n\tat
org.apache.lucene.search.FieldComparator$TermOrdValComparator.getSortedDocValues(FieldComparator.java:762)\n\tat
org.apache.lucene.search.FieldComparator$TermOrdValComparator.getLeafComparator(FieldComparator.java:767)\n\tat
org.apache.lucene.search.FieldValueHitQueue.getComparators(FieldValueHitQueue.java:183)\n\tat
org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector.getLeafCollector(TopFieldCollector.java:164)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:660)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)\n\tat
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:241)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1823)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1640)\n\tat
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611)\n\tat
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533)\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2299)\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\n\tat
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat
java.lang.Thread.run(Thread.java:745)\n", "code":500}}

Thanks,

Matt

Re: Solr 6 - unexpected docvalues type NONE for field

Posted by mtn search <se...@gmail.com>.
Thanks Shawn for your response!

Yes, we are on our way to indexing clients to SolrCloud 8 (and soon 9).  We
have a massive Solr 6 deployment and it will take some time and so Solr 6
maintenance is still part of our job.  We had not seen this error, but
recently a client complained of search failures and this was the underlying
cause.

Initially I was puzzled as I did not believe much had changed.  What
revealed the problem was the combination of the user using this sort field
and searching way back on historical Solr 6 cores where an index problem
was lying yet to be revealed.  I looked at the history of the schema
(before my time at this company), and indeed sortableSender and another
field were previously set to have docValues=true, and then changed to off.
It made us wonder if this change was handled properly in terms of taking
care of the index.  We plan to kick off a re-index for the core but also
wondered if we needed to take further action.  Your email confirms that we
should delete the index (and files/dirs) before re-indexing.

Thanks again,
Matt


On Mon, Jun 12, 2023 at 12:28 PM Shawn Heisey <ap...@elyograg.org> wrote:

> On 6/12/23 10:24, mtn search wrote:
> > Any tips as to why this error is occurring? Occurs with query when
> sorting
> > on sortableSender or other fields with docvalues set to false.  Plan to
> > re-index, but would like to better understand this issue.  Why would it
> > expect "=SORTED" when docvalues is set to false?
> >
> > <field name="sortableSender" type="icuCollationDefault" indexed="true"
> > stored="true" multiValued="false" required="false" docValues="false" />
> >
> > Solr version 6.4.2
> > <luceneMatchVersion>6.4.0</luceneMatchVersion>
> >
> > *error":{ "msg":"unexpected docvalues type NONE for field
> 'sortableSender'
>
> You realize that Solr 6.x is completely end of life, right?  For a long
> time now.
>
> Why are you turning docValues off on a field that you want to use for
> sorting?  docValues make sorting a LOT faster.  It is possible that 6.x
> is assuming that a field used for sorting has docValues, but I am
> thinking it might be another problem:
>
> Did you ever have docValues defned for this field?  If so, did you
> completely wipe the index and rebuild it after you changed the docValues
> setting?  If you change just about anything on a field that has
> docValues, completely deleting the index directories using that schema
> and rebuilding the index from scratch is required.  This is a
> requirement baked into Lucene, it doesn't come from Solr.  f you don't
> do this, then you get docValues errors.
>
> Thanks,
> Shawn
>

Re: Solr 6 - unexpected docvalues type NONE for field

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/12/23 10:24, mtn search wrote:
> Any tips as to why this error is occurring? Occurs with query when sorting
> on sortableSender or other fields with docvalues set to false.  Plan to
> re-index, but would like to better understand this issue.  Why would it
> expect "=SORTED" when docvalues is set to false?
> 
> <field name="sortableSender" type="icuCollationDefault" indexed="true"
> stored="true" multiValued="false" required="false" docValues="false" />
> 
> Solr version 6.4.2
> <luceneMatchVersion>6.4.0</luceneMatchVersion>
> 
> *error":{ "msg":"unexpected docvalues type NONE for field 'sortableSender'

You realize that Solr 6.x is completely end of life, right?  For a long 
time now.

Why are you turning docValues off on a field that you want to use for 
sorting?  docValues make sorting a LOT faster.  It is possible that 6.x 
is assuming that a field used for sorting has docValues, but I am 
thinking it might be another problem:

Did you ever have docValues defned for this field?  If so, did you 
completely wipe the index and rebuild it after you changed the docValues 
setting?  If you change just about anything on a field that has 
docValues, completely deleting the index directories using that schema 
and rebuilding the index from scratch is required.  This is a 
requirement baked into Lucene, it doesn't come from Solr.  f you don't 
do this, then you get docValues errors.

Thanks,
Shawn