Solr exception: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Solr exception: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.

Alex Broitman

We got the Solr exception when searching in Solr:

 

SolrNet.Exceptions.SolrConnectionException: <?xml version="1.0" encoding="UTF-8"?>

<response>

<lst name="responseHeader"><bool name="zkConnected">true</bool><int name="status">500</int><int name="QTime">160</int><lst name="params"><str name="hl">true</str><str name="fl">vid:def(rid,id),name,nls_NAME___en-us,nls_NAME_NLS_KEY,txt_display_name,sysid</str><str name="hl.requireFieldMatch">true</str><str name="start">0</str><str name="hl.usePhraseHighlighter">true</str><arr name="fq"><str>gid:(0 21)</str><str>-(+type:3 -recipients:5164077)</str><str>-disabled_types:(16 1024 2048)</str><str>{!acls user="5164077" gid="21" group="34" pcid="6" ecid="174"}</str></arr><str name="rows">20</str><str name="version">2.2</str><str name="q">+(Dashboard Dashboard*)</str><str name="defType">edismax</str><str name="spellcheck.q">Dashboard</str><str name="qf">name nls_NAME___en-us</str><str name="spellcheck">true</str><str name="boost">product(sum(1,product(norm(acl_i),termfreq(acl_i,5164077))),if(exists(weight),weight,1))</str><str name="hl.fl">sysid</str><str name="spellcheck.count">1</str><str name="spellcheck.collate">true</str></lst></lst><lst name="error"><str name="msg">unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.</str><str name="trace">java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.

                at org.apache.lucene.index.DocValues.checkField(DocValues.java:212)

                at org.apache.lucene.index.DocValues.getDocsWithField(DocValues.java:324)

                at org.apache.lucene.queries.function.valuesource.FloatFieldSource.getValues(FloatFieldSource.java:56)

                at org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:48)

                at org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:35)

                at org.apache.lucene.queries.function.valuesource.IfFunction.getValues(IfFunction.java:47)

                at org.apache.lucene.queries.function.valuesource.MultiFloatFunction.getValues(MultiFloatFunction.java:76)

                at org.apache.lucene.queries.function.BoostedQuery$CustomScorer.&lt;init&gt;(BoostedQuery.java:124)

                at org.apache.lucene.queries.function.BoostedQuery$CustomScorer.&lt;init&gt;(BoostedQuery.java:114)

                at org.apache.lucene.queries.function.BoostedQuery$BoostedWeight.scorer(BoostedQuery.java:98)

                at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:126)

                at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)

                at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:381)

                at org.apache.lucene.search.Weight.bulkScorer(Weight.java:160)

                at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:375)

                at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:665)

                at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:472)

                at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:217)

                at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1582)

                at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1399)

                at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:566)

                at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:545)

                at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:296)

                at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)

                at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)

                at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)

                at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)

                at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)

                at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)

                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)

                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)

                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)

                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)

                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)

                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)

                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)

                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)

                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)

                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)

                at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)

                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)

                at org.eclipse.jetty.server.Server.handle(Server.java:534)

                at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)

                at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)

                at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)

                at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)

                at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)

                at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)

                at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)

                at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)

                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)

                at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)

                at java.lang.Thread.run(Thread.java:748)

</str><int name="code">500</int></lst>

</response>

 

The ‘weight’ field defined in schemas as following:

   <field name="weight" type="float" indexed="true" stored="true" required="false" />

Where “float” defined as:

    <fieldType name="float" class="solr.FloatPointField" positionIncrementGap="0"/>

 

What does the error means? How can I handle it?

 

Thanks.

 

Alex Broitman | Integration Developer
4 HaHarash Street
| PO Box 7330 | Hod Hasharon, ISRAEL 45241
F: +972-9-7944333
| C: +972-54-4771776 | W: www.clarizen.com

E: [hidden email]

 

 

 

 

 

We are a 2018 Gartner Peer Insights Customers’ Choice for Project Portfolio Management, Worldwide

 

Reviews from your enterprise peers – verified by Gartner

 

See what our users have to say

 

 

Contribute a review today

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Solr exception: java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.

Erick Erickson
"Re-index with correct docvalues”. I.e. define weight to have docValues=true in your schema. WARNING: you have to totally get rid of your current data, I’d recommend starting with a new collection.

> On Apr 10, 2019, at 12:21 AM, Alex Broitman <[hidden email]> wrote:
>
> We got the Solr exception when searching in Solr:
>  
> SolrNet.Exceptions.SolrConnectionException: <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><bool name="zkConnected">true</bool><int name="status">500</int><int name="QTime">160</int><lst name="params"><str name="hl">true</str><str name="fl">vid:def(rid,id),name,nls_NAME___en-us,nls_NAME_NLS_KEY,txt_display_name,sysid</str><str name="hl.requireFieldMatch">true</str><str name="start">0</str><str name="hl.usePhraseHighlighter">true</str><arr name="fq"><str>gid:(0 21)</str><str>-(+type:3 -recipients:5164077)</str><str>-disabled_types:(16 1024 2048)</str><str>{!acls user="5164077" gid="21" group="34" pcid="6" ecid="174"}</str></arr><str name="rows">20</str><str name="version">2.2</str><str name="q">+(Dashboard Dashboard*)</str><str name="defType">edismax</str><str name="spellcheck.q">Dashboard</str><str name="qf">name nls_NAME___en-us</str><str name="spellcheck">true</str><str name="boost">product(sum(1,product(norm(acl_i),termfreq(acl_i,5164077))),if(exists(weight),weight,1))</str><str name="hl.fl">sysid</str><str name="spellcheck.count">1</str><str name="spellcheck.collate">true</str></lst></lst><lst name="error"><str name="msg">unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.</str><str name="trace">java.lang.IllegalStateException: unexpected docvalues type NUMERIC for field 'weight' (expected one of [BINARY, NUMERIC, SORTED, SORTED_NUMERIC, SORTED_SET]). Re-index with correct docvalues type.
>                 at org.apache.lucene.index.DocValues.checkField(DocValues.java:212)
>                 at org.apache.lucene.index.DocValues.getDocsWithField(DocValues.java:324)
>                 at org.apache.lucene.queries.function.valuesource.FloatFieldSource.getValues(FloatFieldSource.java:56)
>                 at org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:48)
>                 at org.apache.lucene.queries.function.valuesource.SimpleBoolFunction.getValues(SimpleBoolFunction.java:35)
>                 at org.apache.lucene.queries.function.valuesource.IfFunction.getValues(IfFunction.java:47)
>                 at org.apache.lucene.queries.function.valuesource.MultiFloatFunction.getValues(MultiFloatFunction.java:76)
>                 at org.apache.lucene.queries.function.BoostedQuery$CustomScorer.&lt;init&gt;(BoostedQuery.java:124)
>                 at org.apache.lucene.queries.function.BoostedQuery$CustomScorer.&lt;init&gt;(BoostedQuery.java:114)
>                 at org.apache.lucene.queries.function.BoostedQuery$BoostedWeight.scorer(BoostedQuery.java:98)
>                 at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:126)
>                 at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:400)
>                 at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:381)
>                 at org.apache.lucene.search.Weight.bulkScorer(Weight.java:160)
>                 at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:375)
>                 at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:665)
>                 at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:472)
>                 at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:217)
>                 at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1582)
>                 at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1399)
>                 at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:566)
>                 at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:545)
>                 at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:296)
>                 at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
>                 at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
>                 at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
>                 at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
>                 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
>                 at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
>                 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
>                 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
>                 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>                 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>                 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
>                 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
>                 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
>                 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>                 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
>                 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>                 at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
>                 at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
>                 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>                 at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
>                 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
>                 at org.eclipse.jetty.server.Server.handle(Server.java:534)
>                 at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
>                 at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
>                 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
>                 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
>                 at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
>                 at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
>                 at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
>                 at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
>                 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
>                 at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
>                 at java.lang.Thread.run(Thread.java:748)
> </str><int name="code">500</int></lst>
> </response>
>  
> The ‘weight’ field defined in schemas as following:
>    <field name="weight" type="float" indexed="true" stored="true" required="false" />
> Where “float” defined as:
>     <fieldType name="float" class="solr.FloatPointField" positionIncrementGap="0"/>
>  
> What does the error means? How can I handle it?
>  
> Thanks.
>  
> Alex Broitman | Integration Developer
> 4 HaHarash Street | PO Box 7330 | Hod Hasharon, ISRAEL 45241
> F: +972-9-7944333 | C: +972-54-4771776 | W: www.clarizen.com
>
> E: [hidden email]
>
>  
>  
>
>  
>  
>  
> We are a 2018 Gartner Peer Insights Customers’ Choice for Project Portfolio Management, Worldwide
>  
> Reviews from your enterprise peers – verified by Gartner
>  
> See what our users have to say
>  
>  
> Contribute a review today