daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Jan 9th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. We are developing custom search interfaces in Alfresco Share and we found following issue when ordering results by “cm:versionLabel” property.
  2.  
  3. The problem can be reproduced by running following sentence.
  4.  
  5. $ curl -X GET \
  6.   'http://localhost/alfresco/s/slingshot/search?filters=&term=%2A&sort=cm%3AversionLabel%7Ctrue&alf_ticket=TICKET_e1e841e4cfcdde43fe4154c6e8687b89b6541e77' \
  7.   -H 'Authorization: Basic YWRtaW46YWRtaW4='
  8.  
  9. This query returns 0 results, while the following one (ordering by "cm:name")…
  10.  
  11. $ curl -X GET   'http://localhost/alfresco/s/slingshot/search?filters=&term=%2A&sort=cm%3Aname%7Ctrue&alf_ticket=TICKET_e1e841e4cfcdde43fe4154c6e8687b89b6541e77’  
  12.   -H 'Authorization: Basic YWRtaW46YWRtaW4=‘
  13.  
  14. … returns the expected results.
  15.  
  16. Following complain is found at SOLR 6 log file.
  17.  
  18. solr6_1_6acc8b8daca2 | 2018-11-23 14:27:13.392 ERROR (qtp1205044462-12) [   x:alfresco] o.a.s.s.HttpSolrCall null:java.lang.IllegalStateException: unexpected docvalues type SORTED_SET for field 'text@s__lt@{http://www.alfresco.org/model/content/1.0}versionLabel' (expected=SORTED). Re-index with correct docvalues type.
  19. solr6_1_6acc8b8daca2 | at org.apache.lucene.index.DocValues.checkField(DocValues.java:212)
  20. solr6_1_6acc8b8daca2 | at org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)
  21. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.FieldComparator$TermOrdValComparator.getSortedDocValues(FieldComparator.java:762)
  22. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.FieldComparator$TermOrdValComparator.getLeafComparator(FieldComparator.java:767)
  23. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.FieldValueHitQueue.getComparators(FieldValueHitQueue.java:180)
  24. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.TopFieldCollector$SimpleFieldCollector.getLeafCollector(TopFieldCollector.java:100)
  25. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.MultiCollector.getLeafCollector(MultiCollector.java:121)
  26. solr6_1_6acc8b8daca2 | at org.apache.solr.search.DelegatingCollector.doSetNextReader(DelegatingCollector.java:79)
  27. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.SimpleCollector.getLeafCollector(SimpleCollector.java:33)
  28. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:659)
  29. solr6_1_6acc8b8daca2 | at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:472)
  30. solr6_1_6acc8b8daca2 | at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:217)
  31. solr6_1_6acc8b8daca2 | at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1678)
  32. solr6_1_6acc8b8daca2 | at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1395)
  33. solr6_1_6acc8b8daca2 | at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:566)
  34. solr6_1_6acc8b8daca2 | at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:545)
  35. solr6_1_6acc8b8daca2 | at org.apache.solr.handler.component.AlfrescoSearchHandler.handleRequestBody(AlfrescoSearchHandler.java:351)
  36. solr6_1_6acc8b8daca2 | at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
  37. solr6_1_6acc8b8daca2 | at org.apache.solr.core.SolrCore.execute(SolrCore.java:2477)
  38. solr6_1_6acc8b8daca2 | at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723)
  39. solr6_1_6acc8b8daca2 | at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529)
  40. solr6_1_6acc8b8daca2 | at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)
  41. solr6_1_6acc8b8daca2 | at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)
  42. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
  43. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
  44. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
  45. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
  46. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
  47. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
  48. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
  49. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
  50. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
  51. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  52. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
  53. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
  54. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
  55. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
  56. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
  57. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.Server.handle(Server.java:534)
  58. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
  59. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
  60. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
  61. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
  62. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
  63. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
  64. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
  65. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
  66. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
  67. solr6_1_6acc8b8daca2 | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
  68. solr6_1_6acc8b8daca2 | at java.lang.Thread.run(Thread.java:748)
  69.  
  70. It seems like there is some problem with “cm:labelVersion” indexation, but don’t identify differences with the other properties indexed.
  71.  
  72. We made the same test using SOLR 4 and the query works as expected. So it looks like it’s a SOLR 6 related problem.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand