Skip to content
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

Simple schema #41

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Simple schema #41

wants to merge 8 commits into from

Conversation

tonycoz
Copy link

@tonycoz tonycoz commented Jun 14, 2019

simple wrapper around the schema API (and deals with the broken ordered keys they need)

I'd like this to support perl's true/false values, but that's a lot of
work, it could be done for the simple field/type members, but
analyzers have a huge selection of variants and options, and supporting
it there would be painful.
@petdance
Copy link
Owner

I'm sorry, I don't understand what this is. Please tell me what this code is for.

@tonycoz
Copy link
Author

tonycoz commented Jun 14, 2019

It wraps the managed schema api:

https://lucene.apache.org/solr/guide/7_7/schema-api.html

so you can update the schema via WebService::Solr.

The schema() method is pretty simple, but the edit_schema() method deals with the strange ordered, duplicate key JSON objects to allow several schema updates in a simple request.

Hopefully the switch from "add-field-type" to "add_type" (briefer and a perl id for =>) makes it more usable too.

@petdance
Copy link
Owner

I don't know anything about the schema API. I'm using Solr 4 in my day-to-day life.

Do we need to add docs and explanations about how and why to use this API?

@tonycoz
Copy link
Author

tonycoz commented Jun 15, 2019

I think the examples provide enough information on how to use the API. For anything beyond that they'd need to check the schema documentation (which we might link to)

As to why, I've used the schema API to deploy a schema to a Solr server.

One other thing I considered adding to this was making the deploy_schema.pl example into a method (with some usability changes, so if no types are provided no type changes are deployed, etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants