使用Angu访问弹性搜索索引

2024-09-29 23:25:29 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用Python2.7作为后端,AngularJS用于前端。我使用的是AWS弹性搜索2.3.3,它是活动的,数据是索引的。但是当我尝试从angular查询索引时,我面临以下问题。在

{1美元^

(function() {
'use strict';

angular.module('jobgatorApp', ['ui.router', 'ui.bootstrap', 'angular-carousel', 'ui.tinymce', 'elasticsearch'
    //NO NOT TOUCH THE FOLLOWING LINE, IT IS SEARCH AND REPLACED BY GRUNT WHEN WE MINIFY THE JS
    ])

//TODO RESEARCH LAZY LOAD http://stackoverflow.com/questions/28184616/angularjs-lazy-load-template-and-controller-in-ui-router-requirejs-oclazyload
//TODO RESEARCH SECURITY http://stackoverflow.com/questions/20870386/authentication-with-angularjs-session-management-and-security-issues-with-rest
//TODO RESEARCH SECURITY http://www.pluralsight.com/courses/angularjs-security-fundamentals
    .factory('elasticClient', ['esFactory', function (esFactory) {
        return esFactory({
            location: 'https://search-myjobgator-mkumzk6ax5z3ogumel2ga37bq4.us-west-2.es.amazonaws.com',
            sniffOnStart: true,
            sniffInterval: 300000
        });
    }])
})();

Tags: andthecomhttpuifunctionstackoverflowtodo

热门问题