Closed dogawaf closed 5 years ago
@dogawaf
Hi, there is a huge difference between Solr 4 & 6. I think the source of the problem could be that the access field was changed from single value to multivalue. Currently we propose to reIndex you documents. I guess a automatic migration could be quite complex and reindexing is quicker.
I just stumbled over this issue, and in my case got the same Exception when searching. That is not an index problem. The &fq=%7B%21typo3access%7D-1%2C0
part of the URL is the problem. If I change it to &fq={!typo3access}-1,0
(urldecoded), I do not get the exception anymore. Is this maybe an Apache Solr bug? Maybe we should urldecode before sending the query to Solr? Why is it urlencoded in the first place??
I guess we have to analyze that. It could be, that there is a different behaviour between tomcat and jetty now.
@baschny, which versions of EXT:solr and the plugin are you using? What is the datatype of the access field in your schema? Is it multiValued="true"? And did you build a fresh new index or update the schema?
@timohund thanks for returning. I think the problem might be that we have a different Schema running on Solr as the extension expects, so there is a chance that this could be the problem. Will clear that up today, as I already requested the hoster (not our own infrastructure) to reinstall Solr with the correct schema. I will get back here if this fixed the problem.
Ok, as background information. The access field was changed from singleValue to multiValue, but both should still work, but it requires a re-indexing, so when you have the data as singleValue but the schema as multivalue, this could be a problem. But EXT:solr requires to have it as multiValue field since EXT:solr 6.0.0
Hi community, Any update on this? I'm facing same issue.
My Query is
http://localhost:8983/solr/403_400_2/select?indent=on&wt=json&mm=0%25& facet.field={!ex=Category}Category& facet.field=Manufacturer& facet.field=Vendor& start=0& fq={!tag=Category}& fq=Price:[0+TO+9999999999999]& rows=6& version=2.2& bq=& facet.query=AverageRating:[4+TO+5]& facet.query=AverageRating:[3+TO+5]& facet.query=AverageRating:[2+TO+5]& facet.query=AverageRating:[1+TO+5]& q=(apple)& defType=edismax& spellcheck.q=(apple)& qf=Name^1+ShortDescription^1+FullDescription^1+CategoryCopy^1+ManufacturerCopy^1+Sku^1+ChildSku^1+GTIN^1+nGramContent+Tag+ManufacturerPartNumber+CustomProperties& spellcheck=true& stats=true& facet.mincount=1& facet=true& wt=xml& spellcheck.collate=true& stats.field=Price
Out put:
{ "responseHeader":{ "status":500, "QTime":5, "params":{ "mm":"0%", "facet.field":["{!ex=Category}Category", "Manufacturer", "Vendor"], "indent":"on", "start":"0", "fq":["{!tag=Category}", "Price:[0 TO 9999999999999]"], "rows":"6", "version":"2.2", "bq":"", "facet.query":["AverageRating:[4 TO 5]", "AverageRating:[3 TO 5]", "AverageRating:[2 TO 5]", "AverageRating:[1 TO 5]"], "q":"(apple)", "defType":"edismax", "spellcheck.q":"(apple)", "qf":"Name^1 ShortDescription^1 FullDescription^1 CategoryCopy^1 ManufacturerCopy^1 Sku^1 ChildSku^1 GTIN^1 nGramContent Tag ManufacturerPartNumber CustomProperties", "spellcheck":"true", "stats":"true", "facet.mincount":"1", "wt":["json", "xml"], "facet":"true", "spellcheck.collate":"true", "stats.field":"Price"}}, "error":{ "trace":"java.lang.NullPointerException\r\n\tat org.apache.solr.search.QueryResultKey.<init> QueryResultKey.java:52)\r\n\tat org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1550)\r\n\tat org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611)\r\n\tat org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533)\r\n\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)\r\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:2299)\r\n\tat org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:534)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\r\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\r\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\tat org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\r\n\tat org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\r\n\tat java.lang.Thread.run(Unknown Source)\r\n", "code":500}}
Documents on query: http://localhost:8983/solr/403_400_2/select?fq=apple&indent=on&q=*:*&wt=json
{ "responseHeader":{ "status":0, "QTime":1, "params":{ "q":"*:*", "indent":"on", "fq":"apple", "wt":"json"}}, "response":{"numFound":2,"start":0,"docs":[ { "Id":4, "Name":"Apple MacBook Pro 13-inch", "NameCopy":"Apple MacBook Pro 13-inch", "ShortDescription":"A groundbreaking Retina display. A new force-sensing trackpad. All-flash rchitecture. Powerful dual-core and quad-core Intel processors. Together, these features take the notebook to a new level of performance. And they will do the same for you in everything you create.", "SeName":"apple-macbook-pro-13-inch", "Sku":"AP_MBP_13", "OldPrice":0.0, "Price":1800.0, "IsRental":false, "RentalPricePeriodId":0, "RentalPriceLength":0, "CallForPrice":false, "CustomerEntersPrice":false, "AvailableForPreOrder":false, "DisableBuyButton":false, "ImageURL":"//localhost:15536/images/thumbs/0000024_apple-macbook-pro-13-inch_415.jpeg", "ManufacturerID":[1], "Manufacturer":["Apple!!1!!"], "smanufacturer":["Apple!!1!!"], "CreatedDate":"2018-08-20T03:19:39.280Z", "CategoryID":[3], "TagID":[1, 2, 4], "Category":["Notebooks!!2!!"], "scategory":["Notebooks!!2!!"], "Tag":["awesome", "computer", "compact"], "TimeStamp":"2018-09-11T05:53:52.149Z", "f_CPU+Type":["Intel+Core+i5"], "Attributes":["Intel+Core+i5", "4+GB"], "sf_CPU+Type":["Intel+Core+i5"], "f_Memory":["4+GB"], "sf_Memory":["4+GB"], "CDO_3":2, "MDO_1":1, "VendorID":0, "AllowCustomerReviews":true, "ApprovedRatingSum":5, "ApprovedTotalReviews":1, "AverageRating":5.0, "ProductType":5, "IsTaxExempt":false, "TaxCategoryId":2, "TotalVariants":0, "StockAvailability":true, "MarkAsNew":false, "DisableWishlistButton":false, "RoleID":[1, 2, 3, 4, 5], "_version_":1611289311844499456}, { "Id":17, "Name":"Apple iCam", "NameCopy":"Apple iCam", "ShortDescription":"Photography becomes smart", "SeName":"apple-icam", "Sku":"APPLE_CAM", "OldPrice":0.0, "Price":1300.0, "IsRental":false, "RentalPricePeriodId":0, "RentalPriceLength":0, "CallForPrice":false, "CustomerEntersPrice":false, "AvailableForPreOrder":false, "DisableBuyButton":false, "ImageURL":"//localhost:15536/images/thumbs/0000040_apple-icam_415.jpeg", "ManufacturerID":[1], "Manufacturer":["Apple!!1!!"], "smanufacturer":["Apple!!1!!"], "CreatedDate":"2018-08-20T03:19:46.073Z", "CategoryID":[6], "Category":["Camera+%26+photo!!1!!"], "scategory":["Camera+%26+photo!!1!!"], "TimeStamp":"2018-09-11T05:53:52.324Z", "CDO_6":1, "MDO_1":1, "VendorID":0, "AllowCustomerReviews":true, "ApprovedRatingSum":4, "ApprovedTotalReviews":1, "AverageRating":4.0, "ProductType":5, "IsTaxExempt":false, "TaxCategoryId":2, "TotalVariants":0, "StockAvailability":true, "MarkAsNew":false, "DisableWishlistButton":false, "RoleID":[1, 2, 3, 4, 5], "_version_":1611289311919996928}] }}
I just stumbled over this issue, and in my case got the same Exception when searching. That is not an index problem. The &fq=%7B%21typo3access%7D-1%2C0 part of the URL is the problem. If I change it to &fq={!typo3access}-1,0 (urldecoded), I do not get the exception anymore. Is this maybe an Apache Solr bug? Maybe we should urldecode before sending the query to Solr? Why is it urlencoded in the first place??
this solution is not working at my end.
@rajupaladiya In your query typo3access
is not present at all, what kind of query is that. What v ersion of Apache Solr, EXT:solr and the accessfilter plugin are you using?
@timohund - Hey thank you for asking. I forget to value in fq after upgrade to my code in Asp.Net CORE and SolrNet. I've fixed and filtering and faceting is now working fine. Thank you
@rajupaladiya does this mean that we can close this issue from your perspective?
@timohund - yes sure. You can close for my issue.
Hello
I've migrated a solr index from 4 to 5, then from 5 to 6. Everything went fine. All my documents are now in the new solr installation.
But, searching with typo3access throw a java error when document from the old index are in the resultset. The error does not occur with fresh indexed document. I'm not a java expert, so I did not find any idea about the cause of this issue.
I wonder if you can help me with that. I could not reindex all the document with the new schema...
Below the search query, the java error, a working document and a failing document.
Search query
http://solr:8984/solr/core_fr/select?facet=on&facet.prefix=jap&facet.field=spell&facet.limit=10&facet.mincount=1&fq=%7B%21typo3access%7D-1%2C0&fq=siteHash%3A%xxx%22&fl=spell&q.alt=%2A%3A%2A&omitHeader=true&wt=json&json.nl=map&q=&start=0
Java error
Document indexed with ext:solr v6
Document indexed with ext:solr v3
java 1.8.0_45-b14 ext:solr 6.1.0 solr-typo3-plugin 2.0.0