-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'stats' #16
Comments
@eulereadgbe seems there is something wrong with current 1.4.4-dev. I just noticed the same bug in my test environment, but v1.4.3 works. |
I downloaded the v1.4.3 tag but I still have the same error as the master and v6_x branch. I also tested 1.2.0, 1.4.2, and 1.4.3 releases.
I'm not sure if my issue is Windows OS related only. Sorry I don't have a non-Windows instance where I can test this. |
Yes actually I was mistaken, v1.4.4-dev is working here also (and looking at the few git commits since v1.4.3 I haven't changed anything other than updating dependencies). So back to your problem. Are you using the built-in Solr 4.10.x that comes with DSpace 6.x, or a standalone Solr? This is the HTTP request that the indexer makes to Solr: http://localhost:8080/solr/statistics/select?q=type%3A2+AND+id%3A%2F.%7B36%7D%2F&fq=-isBot%3Atrue+AND+statistics_type%3Aview&fl=id&facet=true&facet.field=id&facet.mincount=1&facet.limit=1&facet.offset=0&stats=true&stats.field=id&stats.calcdistinct=true&shards=&rows=0&wt=json Do you get a result if you paste this URL into your browser? Note that this assumes Solr is at |
I checked the Solr version I'm using and it is version 4.10.4 and this Solr comes with the DSpace 6.3 installation. Below is the result of the Solr query:
It seems it is returning a code 500 error. Is there something wrong with my Solr instance? I tried this also with the other 6.3 repositories I'm maintaining and the results were the same, however, when I tried this in an instance running 6.4-SNAPSHOT, the results were ok. Results from an instance running 6.4-SNAPSHOT:
I'll try |
That's really strange. Seems to be something with Solr... I don't know, but this is weird:
I see some results on Google for that, related to Elasticsearch and Solr, both of which are based on Lucene. Unfortunately I am not an expert on Solr so this is beyond me. I manage two DSpace 6.3 installations and test this locally in my dev environment as well and it works on all... |
@alanorth , so I just tested this in a repository where your Solr query did not return an error. I just upgrade the Solr of this repository to use UUIDs, and I made sure that all INT IDs were migrated to UUIDs:
However, when I run
I don't understand why it is complaining about an unmigrated community ID when all the IDs were migrated to UUIDs. I also tried reindexing the Solr statistics but the result is still the same. I tested this in Python versions 3.7.9 and 3.9.6. Anyways, I am just curious and interested to try this API although I can't get past this indexing and I also found out that |
Oh yes, I've dealt with this issue of unmigrated IDs a few years ago when we upgrade to DSpace 6. It's a known issue according to the DSpace 6 docs:
I purged them all like this, for each statistics core if it is sharded: $ curl -s "http://localhost:8081/solr/statistics/update?softCommit=true" -H "Content-Type: text/xml" --data-binary '<delete><query>id:/.*unmigrated.*/</query></delete>' That uses a regular expression to match unmigrated IDs:
Oh! 😮 I haven't used Windows in twenty years so I have no idea. You will have to search for a WSGI server that runs on Windows. Sorry... |
@alanorth, when I tried running
python -m dspace_statistics_api.indexer
, I received this error:I tried this in a repository with no shards, and another with sharded statistics. Both repositories are using DSpace version 6.3 running on Windows 2019 Server and tested with Python versions 3.7.9, 3.9.1, and 3.9.10. What could I be missing?
The text was updated successfully, but these errors were encountered: