HUE-9075 [solr] Fix Solr query return 414 response code when GET parameters is too long

Review Request #14465 — Created Nov. 8, 2019 and submitted

yingc
hue
solr_414_fix
HUE-9075
jgauthier, johan, ranade, romain, weixia
commit b4f6ae3999740f67b1a3f5f43b0feea03270cd7c (HEAD -> solr_414_fix)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Fri Nov 8 14:09:32 2019 -0800

    HUE-9075 [solr] Fix Solr query return 414 response code when GET parameters is too long

:100644 100644 2cff2b2476... 232d3417ae... M    desktop/libs/libsolr/src/libsolr/api.py


  • 0
  • 0
  • 5
  • 0
  • 5
Description From Last Updated
romain
  1. Some feedback that in general would help reviewing:
    - we should provide more context on why we should switch to POST
    - we should not leave old commented code

  2. desktop/libs/libsolr/src/libsolr/api.py (Diff revision 1)
     
     
     
     
     
     

    Remove and move to line 289s below?

  3. desktop/libs/libsolr/src/libsolr/api.py (Diff revision 1)
     
     

    nit:

    Facet data can be large, so using POST to avoid HTTP 414

  4. desktop/libs/libsolr/src/libsolr/api.py (Diff revision 1)
     
     
     
     

    nit: indent

    response = self._root.post(
    '%(collection)s/select' % solr_query, params,
    data=json_data,
    contenttype='application/json'
    )

  5. 
      
yingc
romain
  1. 
      
  2. desktop/libs/libsolr/src/libsolr/api.py (Diff revision 2)
     
     

    nit: new line before 'params'

  3. desktop/libs/libsolr/src/libsolr/api.py (Diff revision 2)
     
     

    data=json.dumps({'facet': json_facets})

    ?

  4. 
      
yingc
romain
  1. Ship It!
  2. 
      
yingc
Review request changed

Status: Closed (submitted)

Loading...