-
Notifications
You must be signed in to change notification settings - Fork 90
Implement POST route in search method #131
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
Implement POST route in search method #131
Conversation
fc787ea
to
f3de7db
Compare
'attributesToHighlight': '*', | ||
'attributesToRetrieve': '*', | ||
'attributesToCrop': '*', | ||
'attributesToHighlight': ['*'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum! These kinds of changes are breakable, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if this PR is breakable (not a big deal as usual 😉)
@@ -60,9 +60,9 @@ def test_custom_search_params_with_wildcard(self): | |||
'a', | |||
{ | |||
'limit': 5, | |||
'attributesToHighlight': '*', | |||
'attributesToRetrieve': '*', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simple string "*"
is not a valid entry ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't for the post route. Do you think that's a core problem? A simple srting will creat a bad_request response
meilisearch/index.py
Outdated
if key in ('facetsDistribution', 'facetFilters'): | ||
opt_params[key] = json.dumps(opt_params[key]) | ||
elif isinstance(opt_params[key], list): | ||
opt_params[key] = ','.join(opt_params[key]) | ||
params = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params = { | |
body = { |
params = { | |
data = { |
Just better naming because those are not params anymore. But It's up to you if you want to change it.
f3de7db
to
9cd8b4b
Compare
Maybe wait for the meilisearch/meilisearch#866 final decision? |
Exactly, I opened that Issue and not planning to merge untill we get more info :) Thanks @curquiza ! |
Okay, I convert it to draft since we must not merge it 🙂 |
Implement POST route in search method
Use
POST
route instead ofGET
for search methodNote:
attributesToHighlight
,attributesToRetrieve
andattributesToCrop
must always be a list (array) instead of a string so it is properly deserialized by the serverCloses #126