bq: Is their any roadmap to avoid the remanent data issue, Not that I've ever heard of. Well, Uwe did show a process for adding docValues to an existing index here: http://lucene.472066.n3.nabble.com/Adding-Docvalues-to-a-Field-td4333503.html but you can see what kinds of deep-level Lucene knowledge are necessary.
>From my perspective, you'll _have_ to reindex multiple times as your app evolves. The product managers will want new capabilities for instance. The incoming data will change, whatever. You simply must be prepared for this. And you _really_ need to spend time up front getting the first cut right. I flat guarantee you'll re-index multiple times in the process. Unless and until you have a very thorough understanding of when it's really necessary, just completely blow away your index and re-index whenever you change you schema. Oh, there's one safe operation, adding a completely new fieldType or field. But _changing_ either one is chancy. Best, Erick On Mon, Jun 19, 2017 at 5:34 AM, Aman Deep Singh <amandeep.coo...@gmail.com> wrote: > I tried to recreate the collection and its working fine, > But if i try to change the any field level value this error again comes > Is their any roadmap to avoid the remanent data issue, since every time you > change the field definition you need to delete the data directory or > recreate the collection. > > On Fri, Jun 16, 2017 at 11:51 PM Erick Erickson <erickerick...@gmail.com> > wrote: > >> bq: But I only changed the docvalues not the multivalued >> >> It's the same issue. There is remnant metadata when you change whether >> a field uses docValues or not. The error message can be ambiguous >> depending on where the issue is encountered. >> >> Best, >> Erick >> >> On Fri, Jun 16, 2017 at 9:28 AM, Aman Deep Singh >> <amandeep.coo...@gmail.com> wrote: >> > But I only changed the docvalues not the multivalued , >> > Anyway I will try to reproduce this by deleting the entire data directory >> > >> > On 16-Jun-2017 9:52 PM, "Erick Erickson" <erickerick...@gmail.com> >> wrote: >> > >> >> bq: deleted entire index from the solr by delete by query command >> >> >> >> That's not what I meant. Either >> >> a> create an entirely new collection starting with the modified schema >> >> or >> >> b> shut down all your Solr instances. Go into each replica/core and >> >> 'rm -rf data'. Restart Solr. >> >> >> >> That way you're absolutely sure everything's gone. >> >> >> >> Best, >> >> Erick >> >> >> >> On Fri, Jun 16, 2017 at 9:10 AM, Aman Deep Singh >> >> <amandeep.coo...@gmail.com> wrote: >> >> > Yes ,it was a new schema(new collection),and after that I change only >> >> > docvalues= true using schema api,but before changing the schema I have >> >> > deleted entire index from the solr by delete by query command using >> admin >> >> > gui. >> >> > >> >> > On 16-Jun-2017 9:28 PM, "Erick Erickson" <erickerick...@gmail.com> >> >> wrote: >> >> > >> >> > My guess is you changed the definition of the field from >> >> > multiValued="true" to "false" at some point. Even if you re-index all >> >> > docs, some of the metadata can still be present. >> >> > >> >> > Did yo completely blow away the data? By that I mean remove the entire >> >> > data dir (i.e. the parent of the "index" directory) (stand alone) or >> >> > create a new collection (SolrCloud)? >> >> > >> >> > Best, >> >> > Erick >> >> > >> >> > On Fri, Jun 16, 2017 at 1:39 AM, Aman Deep Singh >> >> > <amandeep.coo...@gmail.com> wrote: >> >> >> Hi, >> >> >> Facets are not working when i'm querying with group command >> >> >> request- >> >> >> facet.field=isBlibliShipping&facet=true&group.facet=true& >> >> > group.field=productCode&group=true&indent=on&q=*:*&wt=json >> >> >> >> >> >> Schema for facet field >> >> >> <field name="isBlibliShipping" type="tint" docValues="true" >> multiValued= >> >> >> "false" indexed="true"stored="true"/> >> >> >> >> >> >> It was throwing error stating >> >> >> Type mismatch: isBlibliShipping was indexed with multiple values per >> >> >> document, use SORTED_SET instead >> >> >> >> >> >> The full stacktrace is attached as below >> >> >> 2017-06-16 08:20:47.367 INFO (qtp1205044462-12) [c:productCollection >> >> >> s:shard1 r:core_node1 x:productCollection_shard1_replica1] >> >> >> o.a.s.c.S.Request [productCollection_shard1_replica1] webapp=/solr >> >> >> path=/select >> >> >> params={q=*:*&facet.field=isBlibliShipping&indent=on& >> >> > group.facet=true&facet=true&wt=json&group.field= >> >> productCode&_=1497601224212& >> >> > group=true} >> >> >> hits=5346 status=500 QTime=29 >> >> >> 2017-06-16 08:20:47.369 ERROR (qtp1205044462-12) [c:productCollection >> >> >> s:shard1 r:core_node1 x:productCollection_shard1_replica1] >> >> >> o.a.s.s.HttpSolrCall null:org.apache.solr.common.SolrException: >> >> *Exception >> >> >> during facet.field: isBlibliShipping* >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0( >> >> > SimpleFacets.java:809) >> >> >> at java.util.concurrent.FutureTask.run(FutureTask.java:266) >> >> >> at org.apache.solr.request.SimpleFacets$3.execute( >> >> > SimpleFacets.java:742) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.getFacetFieldCounts( >> >> > SimpleFacets.java:818) >> >> >> at >> >> >> org.apache.solr.handler.component.FacetComponent. >> >> > getFacetCounts(FacetComponent.java:330) >> >> >> at >> >> >> org.apache.solr.handler.component.FacetComponent. >> >> > process(FacetComponent.java:274) >> >> >> 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:745) >> >> >> Caused by: *java.lang.IllegalStateException: Type mismatch: >> >> >> isBlibliShipping was indexed with multiple values per document, use >> >> >> SORTED_SET instead* >> >> >> at >> >> >> org.apache.solr.uninverting.FieldCacheImpl$SortedDocValuesCache. >> >> > createValue(FieldCacheImpl.java:799) >> >> >> at >> >> >> org.apache.solr.uninverting.FieldCacheImpl$Cache.get( >> >> > FieldCacheImpl.java:187) >> >> >> at >> >> >> org.apache.solr.uninverting.FieldCacheImpl.getTermsIndex( >> >> > FieldCacheImpl.java:767) >> >> >> at >> >> >> org.apache.solr.uninverting.FieldCacheImpl.getTermsIndex( >> >> > FieldCacheImpl.java:747) >> >> >> at >> >> >> org.apache.solr.uninverting.UninvertingReader.getSortedDocValues( >> >> > UninvertingReader.java:319) >> >> >> at >> org.apache.lucene.index.DocValues.getSorted(DocValues.java:262) >> >> >> at >> >> >> org.apache.lucene.search.grouping.term.TermGroupFacetCollector$SV. >> >> > doSetNextReader(TermGroupFacetCollector.java:129) >> >> >> at >> >> >> org.apache.lucene.search.SimpleCollector.getLeafCollector( >> >> > SimpleCollector.java:33) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets$2.getLeafCollector(SimpleFacets. >> >> > java:730) >> >> >> at org.apache.lucene.search.IndexSearcher.search( >> >> > IndexSearcher.java:659) >> >> >> at org.apache.lucene.search.IndexSearcher.search( >> >> > IndexSearcher.java:472) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.getGroupedCounts( >> >> > SimpleFacets.java:692) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.getTermCounts( >> >> SimpleFacets.java:476) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.getTermCounts( >> >> SimpleFacets.java:405) >> >> >> at >> >> >> org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0( >> >> > SimpleFacets.java:803) >> >> >> ... 39 more >> >> >> >> >> >> However if I try to query without grouping it is working fine. >> >> >> Any Idea how to fix this. >> >> >> >> >> >> Thanks, >> >> >> Aman Deep Singh >> >> >>