-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Search #48
Conversation
7dd2b89
to
31e14ff
Compare
This one is ready for review. FYI: After some back and forth, I decided to drop support for
However, if a real need arises, it would be trivial to add support for |
@lukasgraf, using a GET with querystring parameters is what REST APIs usually do and not POST (one of the reasons is POST requests cannot be cached, as caching mechanisms are always based on the URL). |
There's a hard dependency on Products.DateRecurringIndex in Didn't have time for a in-depth review yet, will come back later... |
@buchi will do, thanks for the hint! |
Complex queries that consist of dicts with additional query options need to be flattened when submitted via query string, and deserialized again on the the server side.
By default (i.e. unless the user explicitly supplies a 'path' with the query) the search will be constrained to the subtree it was invoked on.
For indexes that support query values or query options that are of non-string types, we need to reconstruct that type information after it got lost over HTTP.
maintain compatibility with vanilla Plone 4.3.
Made |
…nttypes to 1.2.10 to get the cleaned up test fixture.
…ntenttypes version is a major upgrade for us...
… pbauers cleanup.
Hey @lukasgraf, sorry for messing up your pull request. The build was broken and I tried to fix it by upgrading to the latest Plone versions (4 and 5). It turned out the plone.app.contenttypes fixtures got a major refactoring by @pbauer. I pinned plone.app.contenttypes to older versions for now because I could not solve all the issues and I did not want to further mess up things. It already took me a few hours to figure out what went wrong...I will try to have another look after the merge... |
@tisto no worries 😉 Let me know if I can help. |
This implements a named
GET
service/search
that can be invoked on any context to search for Plone content.Usage examples:
path
query is specified)path.query=foo&path.depth=1
) similar to ZPublisher's record arguments, but without the need for the:record
suffixnumeric_index=42:int
), but should rarely be requiredmetadata_fields
parameterSee the documentation update included in this PR for more details on user-facing usage.