Hi Mikhail Khludnev Thanks very much. I go through the src,and make sure that the reason about the UnsupportedOperationException is that the FunctionValues be something unsupportable,like the string type do not override the longVal of the FunctionValue class so that it throws the exeception. And your hint sheds light on me : the _version_ is the key. Recalling that ,originally, the _version_ was set to be string,although I had change it to type long and reload the core,the new time _version_ do not really take effect . The _version_ stilll kept being StrField which make sure with some debuggings. After I have restart the web containner(tomcat),It works(Thank godness),no UnsupportedOperationException comes out.the DIH goes well with the DistributedUpdateProcessorFactory.
Thanks again. 2014-04-24 19:09 GMT+08:00 yypvsxf19870706 <yypvsxf19870...@gmail.com>: > yes , i am sure? > > 发自我的 iPhone > > 在 2014-4-24,18:30,Mikhail Khludnev <mkhlud...@griddynamics.com> 写道: > > > Are you sure that field _version_ is declared correctly in schema.xml? > > > > > > On Thu, Apr 24, 2014 at 12:30 PM, YouPeng Yang < > yypvsxf19870...@gmail.com>wrote: > > > >> SolrCloud 4.6.0 > >> > >> I am using SolrCloud 4.6.0 with a master and replica.I adopt the > >> DistributedUpdateProcessorFactory to distribute the doc between the > master > >> and replica. > >> Firstly,If the master and replica both empty,the DIH will be succeed. > >> And then, DIH again,the replica always thow an > >> UnsupportedOperationException as [1]. > >> the > >> > >> I have check the src,Finally find the FunctionValues.longVal function: > >> public long longVal(int doc) { throw new > UnsupportedOperationException(); > >> } > >> and the implement class StrDocValues does not override the function. > >> > >> And ,I come a idea that,the uniqueKey of the doc that is imported is a > >> string FiledType. As result the StrDocValues.longVal just throw the > >> UnsupportedOperationException . > >> > >> If I really have the uniqueKey be string,is there a way to overwhelm > this > >> error? > >> > >> Any suggestion wiil be appreciated. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > --------------------------------------------------------------------------------- > >> 80711457 [http-bio-8082-exec-19] ERROR org.apache.solr.core.SolrCore – > >> java.lang.UnsupportedOperationException > >> at > >> > >> > org.apache.lucene.queries.function.FunctionValues.longVal(FunctionValues.java:46) > >> at > >> > >> > org.apache.solr.update.VersionInfo.getVersionFromIndex(VersionInfo.java:200) > >> at org.apache.solr.update.UpdateLog.lookupVersion(UpdateLog.java:736) > >> at > >> org.apache.solr.update.VersionInfo.lookupVersion(VersionInfo.java:183) > >> at > >> > >> > org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:685) > >> at > >> > >> > org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:435) > >> at > >> > >> > org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100) > >> at > >> > >> > org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:89) > >> at > >> > >> > org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:151) > > > > > > > > -- > > Sincerely yours > > Mikhail Khludnev > > Principal Engineer, > > Grid Dynamics > > > > <http://www.griddynamics.com> > > <mkhlud...@griddynamics.com> >