-
Notifications
You must be signed in to change notification settings - Fork 302
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
solr v2 api manager #839
solr v2 api manager #839
Conversation
Codecov Report
@@ Coverage Diff @@
## master #839 +/- ##
============================================
- Coverage 91.13% 90.02% -1.11%
- Complexity 3817 3853 +36
============================================
Files 330 336 +6
Lines 8201 8302 +101
============================================
Hits 7474 7474
- Misses 727 828 +101
Continue to review full report at Codecov.
|
perhaps we could provide a generic normalizer for those who don't care about the response? |
6d5ca2f
to
c082540
Compare
also, @dmaicher @thomascorthals @thePanz feel free to comment when you have any input on this.. |
The generic normalizer is a great idea. If |
i initially chose call it |
c082540
to
f453f23
Compare
Codecov Report
@@ Coverage Diff @@
## master #839 +/- ##
============================================
- Coverage 91.21% 90.29% -0.92%
+ Complexity 3802 3323 -479
============================================
Files 328 334 +6
Lines 8146 8212 +66
============================================
- Hits 7430 7415 -15
- Misses 716 797 +81
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This will also close #255. |
hi @mkalkbrenner @thomascorthals @dmaicher first of all sincere apologies for my long term of absence. i'm closing this one as i've pretty much drawn the conclusion there's no generic way to deal with solr's APIs. they all have their quirks of which some quite annoying (hello request parameter api 👋 ) and as solarium pretty much already offers solutions to those problems if you're creative, i doubt whether it's desireable to provide an interface to communicate with solrs apis from within this bundle. i've been messing about with their APIs over here for the last couple of weeks, just for the fun of it. i guess you'll get my point once you browse the source. needless to say that, if you see anything over there you want to have integrated in this library, just let me know. w |
@mkalkbrenner a quick draft just to see whether you like where this is going.
keep in mind that this has been tested on solr non-cloud mode for the schema & config api only, so it's likely to need some additional work.
a little background on some decisions
persist
andflush
is used because of familiarity. and whileflush
in reality is areload
i personally see no problem with that.ApiV2ResponseNormalizerInterface
rather than actual normalizers (see below)normalizers
writing your own normalizers should be easy and by not providing them out of the box, it keeps us from adding dependencies we don't really need. for instance a normalizer could look like:
then creating the manager should be as simple as
models
i'm not sure whether we should provide serializable models as they can get pretty complicated for specific use cases and perhaps we're just better off if we leave them out. on the other hand, we can provide several basic models and have those who require more complex types create them by their own.
i've included one model for demonstration purpose. imagine when you want to set a config property it would be something like:
fixes #838