-
Notifications
You must be signed in to change notification settings - Fork 368
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_type
and .preferences
always error
#642
Comments
Any solution to this ? I am having the same problem |
It actually looks like an |
I've been having the same issue attempting to set the search type to I'm on the I think chewy should not be putting |
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Hey, try the latest master |
Using the latest master, .preference isn't working but .search_type is. Looks like preference is added to the body instead of the query string.
and errors with...
Also tested .search_type which is added to the query string and does appear to work. Does preference need to be added to the list of QUERY_STRING_STORAGES? |
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
Per ES docs: search_type, request_cache, and the allow_partial_search_results should not be in the body. They should be sent as query string parameters. My understanding is that chewy should act like this: $ IssuesIndex.request_cache(true).render # good (new) $ {:index=>["issues"], :type=>["issue"], :body=>{}, :request_cache=>true} # bad (old) $ {:index=>["issues"], :type=>["issue"], :body=>{:request_cache=>true} I believe this resolves issue toptal#586 and part of issue toptal#642. (https://www.elastic.co/guide/en/elasticsearch/reference/6.4/search-request-body.html#_parameters_4)
I have a query like this, which works just fine...
Following the docs, I tried something like this to use the user ID to guarantee the same shards respond for a give user...
... this throws this error...
... which is not that surprising, it looks like it's putting it in the body. This can be seen inspecting with
binding.pry
...... same thing happens when I try to set a
search_type
like this according to the docs...... it gives a similar error ...
... also because it's putting
search_type
in the query body.Elasticsearch docs say both of those should be in the query string instead.
I looked around and tried to find where to fix this, but haven't had time yet to really figure out the Chewy code base. Hopefully this is an easy quick fix for someone that knows their way around? Thanks to anyone who can help with this!
The text was updated successfully, but these errors were encountered: