@decorators.api_view(['POST'])
@decorators.permission_classes((permissions.IsAdminUser,))
@decorators.renderer_classes((JSONRenderer,))
def index_search(request):
 data = request.DATA['data']
 version_pk = data['version_pk']
 commit = data.get('commit')
 version = Version.objects.get(pk=version_pk)
 project_scale = 1
 page_scale = 1
 utils.index_search_request(version=version, page_list=data['page_list'], commit=commit, project_scale=project_scale, page_scale=page_scale)
 return Response({'indexed': True})

@ decorators . api_view ( [ 'POST' ] ) @ decorators . permission_classes ( ( permissions . IsAdminUser , ) ) @ decorators . renderer_classes ( ( JSONRenderer , ) ) def index_search ( request ) : data = request . DATA [ 'data' ] version_pk = data [ 'version_pk' ] commit = data . get ( 'commit' ) version = Version . objects . get ( pk = version_pk ) project_scale = 1 page_scale = 1 utils . index_search_request ( version = version , page_list = data [ 'page_list' ] , commit = commit , project_scale = project_scale , page_scale = page_scale ) return Response ( { 'indexed' : True } )
add things to the search index .