Hi Stanislaw, unfortunately it doesn't work. I changed the line 216 with the new "toString()"-part and rebuild the source. still the same behavior, without errors(because of changes). an another line to change?
Thanks and regards Vadim 2011/12/1 Stanislaw Osinski <stanislaw.osin...@carrotsearch.com> > Hi Vadim, > > I've had limited connectivity, so I couldn't check out the complete 1.4.1 > code and test the changes. Here's what you can try: > > In this file: > > > http://svn.apache.org/viewvc/lucene/solr/tags/release-1.4.1/contrib/clustering/src/main/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java?revision=957515&view=markup > > around line 216 you will see: > > for (Document doc : docs) { > docList.add(doc.getField("solrId")); > } > > You need to change this to: > > for (Document doc : docs) { > docList.add(doc.getField("solrId").toString()); > } > > Let me know if this did the trick. > > Cheers, > > S. > > On Thu, Dec 1, 2011 at 10:43, Vadim Kisselmann > <v.kisselm...@googlemail.com>wrote: > > > Hi Stanislaw, > > did you already have time to create a patch? > > If not, can you tell me please which lines in which class in source code > > are relevant? > > Thanks and regards > > Vadim Kisselmann > > > > > > > > 2011/11/29 Vadim Kisselmann <v.kisselm...@googlemail.com> > > > > > Hi, > > > the quick and dirty way sound good:) > > > It would be great if you can send me a patch for 1.4.1. > > > > > > > > > By the way, i tested Solr. 3.5 with my 1.4.1 test index. > > > I can search and optimize, but clustering doesn't work > (java.lang.Integer > > > cannot be cast to java.lang.String) > > > My uniqieKey for my docs it the "id"(sint). > > > These here was the error message: > > > > > > > > > Problem accessing /solr/select/. Reason: > > > > > > Carrot2 clustering failed > > > > > > org.apache.solr.common.SolrException: Carrot2 clustering failed > > > at > > > > > > org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:217) > > > at > > > > > > org.apache.solr.handler.clustering.ClusteringComponent.process(ClusteringComponent.java:91) > > > at > > > > > > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194) > > > at > > > > > > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) > > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1372) > > > at > > > > > > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356) > > > at > > > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252) > > > at > > > > > > org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) > > > at > > > > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) > > > at > > > > > > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > > > at > > > > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) > > > at > > > > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) > > > at > > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) > > > at > > > > > > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) > > > at > > > > > > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > > > at > > > > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > > > at org.mortbay.jetty.Server.handle(Server.java:326) > > > at > > > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) > > > at > > > > > > org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) > > > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) > > > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > > > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > > > at > > > > > > org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) > > > at > > > > > > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) > > > Caused by: java.lang.ClassCastException: java.lang.Integer cannot be > cast > > > to java.lang.String > > > at > > > > > > org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.getDocuments(CarrotClusteringEngine.java:364) > > > at > > > > > > org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.cluster(CarrotClusteringEngine.java:201) > > > ... 23 more > > > > > > It this case it's better for me to upgrade/patch the 1.4.1 version. > > > > > > Best regards > > > Vadim > > > > > > > > > > > > > > > 2011/11/29 Stanislaw Osinski <stanislaw.osin...@carrotsearch.com> > > > > > >> > > > >> > But my actual live system works on solr 1.4.1. i can only change my > > >> > solrconfig.xml and integrate new packages... > > >> > i check the possibility to upgrade from 1.4.1 to 3.5 with the same > > index > > >> > (without reinidex) with luceneMatchVersion 2.9. > > >> > i hope it works... > > >> > > > >> > > >> Another option would be to check out Solr 1.4.1 source code, fix the > > issue > > >> and recompile the clustering component. The quick and dirty way would > be > > >> to > > >> convert all identifiers to strings in the clustering component, before > > the > > >> they are returned for serialization (I can send you a patch that does > > >> this). The proper way would be to fix the root cause of the problem, > but > > >> I'd need to dig deeper into the code to find this. > > >> > > >> Staszek > > >> > > > > > > > > >