Skip to content

Simple schema - #41

Open
tonycoz wants to merge 8 commits into
petdance:devfrom
tonycoz:simple-schema
Open

Simple schema#41
tonycoz wants to merge 8 commits into
petdance:devfrom
tonycoz:simple-schema

Conversation

@tonycoz

@tonycoz tonycoz commented Jun 14, 2019

Copy link
Copy Markdown

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

tonycoz added 8 commits June 3, 2019 19:13
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
Copy Markdown
Owner

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

@tonycoz

tonycoz commented Jun 14, 2019

Copy link
Copy Markdown
Author

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
Copy Markdown
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

tonycoz commented Jun 15, 2019

Copy link
Copy Markdown
Author

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