-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
SortableIntField in Solr 5.0.0 is deprecated #1147
Comments
Looks like this is just a pull request to change the field types in two places: https://github.com/django-haystack/django-haystack/search?utf8=%E2%9C%93&q=SortableIntField |
I fear this is not only a matter of replacing the field name... I'm unfortunately a beginner about the details of a Solr schema. Also, other problems appear with version 5.0.0, like order_by a Date field which seems broken... |
+1 Reason: can not sort on multivalued field: registration_date |
@philippeluickx You should try the pull-request #1148 that works fine with 5.0.0 |
Yup, trying it now! |
Getting an error here... Traceback (most recent call last): Could it be because of the # sign? I can access the admin through: |
This seems you haven't started or configured your Solr 5.0.0 Core named "orava_core". |
I checked and double checked.
{'cookies': <[]>, '_content': '\n\n <title>Status page</title>\n\n\n |
Could you try to write a new test about the command build_solr_schema without arguments (= 5.0.0 compatible) in the test suite ? This would help me fix the problem, also this would help the pull request being merged... thanks |
Thing is, I am actually still trying to get it to work... By providing the --stdout option I got the xml schema generated, but even with that I am getting DateField being multivalued (which is not) I also would have no clue on how to write a test for the schema generation, as solr 5 is totally new for me (and I am seriously considering downgrading just to get it work).. sorry! |
Another one not working as expected: [Reason: sort param could not be parsed as a query, and is not a field that exists in the index: geodist()] Having the feeling that haystack is not ready yet for 5.0.0 and needs some more testing before going in production. I will gladly give the support I can, but downgrading for now... |
This expected that with Solr 5, if you copy a schema.xml into the core directory, this will be overwritten by the default managed-schema definition. "managed-schema" is automatically generated by Solr 5 at the core's creation and you must not edit it, but better use the Schema REST API. This is why I wrote the new build_solr_schema. read more : https://cwiki.apache.org/confluence/display/solr/Managed+Schema+Definition+in+SolrConfig Sure, more testing is better, but I think we can work a little more on pull request #1148 and get it done ! |
The reason your DateField still being multivalued is that some old schema config is still taken into account by the managed schema of your core. May be you should start over: delete the core, delete the core directory, create the core, and build_solr_schema again. then check your Schema in the web admin of your core where you have the real configuration taken into account by Solr. Schema.xml is not taken into account by Solr 5 by default |
Through the schema browser, the DateField is being marked as Multivalued for Properties and Schema, but not for Index (no idea what that means). I simply created a second core and I am having the same issues. Solr is up and running Solr process 14332 running on port 8983 |
Please try this django app and its "manage.py solr" to test solr 5.0.0 deployment Before everything, please stop any other Solr instance to avoid conflicts. |
We should move this discussion to pull-request #1148 |
Most of Solr 5+ issues can be solved by using a custom schema.xml template based on one of the Solr 5's default schemas https://github.com/nazariyg/Solr-5-for-django-haystack |
The steps given by @nazariyg are very useful, thanks. In my case (django-haystack 2.4.0 and Sol 5.3.0) I built the schema (build_solr_schema command) with the default template and edited the output before pasting to conf directory: These Solr classes and arguments are deprecated in previous versions. |
@asier5 You would still probably need to have the django-haystack's |
@nazariyg Thanks for the information. I see that the output of build_solr_schema already defines these two field types. |
According to this page https://lucene.apache.org/solr/4_10_0/solr-core/org/apache/solr/schema/SortableIntField.html "org.apache.solr.schema.SortableIntField" should be replaced by "org.apache.solr.schema.TrieIntField"
But may be you already know....
manage.py build_solr_schema
, then move it to your new coreVersions:
Quoting CHANGES.txt in the 5.0.0 distribution :
The text was updated successfully, but these errors were encountered: