-
Notifications
You must be signed in to change notification settings - Fork 46
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
Compatibility to managed-schema #260
Comments
@NicolasGoeddel I thought about this as well. Though, this means that we would have to drop support for older versions of Solr, right? |
I don't think so. That API was already available in Solr 6.6.: https://lucene.apache.org/solr/guide/6_6/schema-api.html#SchemaAPI-RetrievetheEntireSchema At least that was the oldest documentation I could find on that page. There are also PDF version available for Solr prior to version 6.6 but I did not take at look at these: http://archive.apache.org/dist/lucene/solr/ref-guide/ |
It seems there are some new issues now. Some attributes can not be found: collective.solr/src/collective/solr/search.py Line 156 in 52cb3ea
AttributeError: indexed collective.solr/src/collective/solr/parser.py Line 228 in 52cb3ea
AttributeError: stored
This happens because the retrieved schema does not add the |
Or for the moment this solution seems to work but is more like an hack: collective.solr/src/collective/solr/parser.py Line 158 in 52cb3ea
Change it to: class SolrField(AttrDict):
""" a schema field representation """
def __init__(self, *args, **kw):
self["required"] = False
self["multiValued"] = False
self["indexed"] = True # added
self["stored"] = True # added
super(SolrField, self).__init__(*args, **kw) |
@NicolasGoeddel you do not have to use kitconcept.recipe.solr (we don't use it in production at all). You could use that as a starting point or copy over the schema configuration though. |
Hi,
I want to suggest a small change for this line:
collective.solr/src/collective/solr/solr.py
Line 332 in 52cb3ea
If you replace it with the following line
collective.solr
will automatically work with a managed-schema which seems to be the default since Solr 8.5.See also https://lucene.apache.org/solr/guide/8_5/schema-api.html#retrieve-schema-examples and scroll down a bit.
The text was updated successfully, but these errors were encountered: