Heroku에서 Neo4j 설치를 쿼리하기 위해 (Heroku에서 실행되지 않는) 웹 응용 프로그램에서 Ajax 호출을 사용하려고합니다. http://login:[email protected]:7322/db/data
Heroku에서 Neo4j REST URL에 액세스 할 수 없습니다.
에서 Heroku가 서버 URL에 접속을 할 때 나는 내 말은 "실패"말할 때 http://localhost:7474/db/data
에서 내 로컬 호스트 서버 URL에 연결하지만 실패했을 경우에 아약스는 완벽하게 작동합니다 (오류는 예상 JSON 응답) 나는 오류를받을 수 없습니다 또는 결과 (Firebug 콘솔에서 모니터링). 그러나 다음과 같이 Heoku에서 Neo4j 웹 관리자 콘솔 (Chrome 또는 Firefox를 사용하지만 IE는 사용하지 않음)에 액세스 할 수 있습니다. http://login:[email protected]:7322/webadmin/
Ajax 코드는 다음과 같습니다.
누구나 내가 잘못하고있는 것과 헤로 쿠에 연결하는 방법을 제안 할 수 있습니까?
restServerURL = "http://login:[email protected]:7322/db/data";
$.ajax({
type:"POST",
url: restServerURL + "/cypher",
crossDomain: true, //recommended by Neo4j (no effect)
dataType: "json",
data: {
query:"START n = node(*) WHERE n.name =~ '(?i)" + request.term + ".*' RETURN n, n.name ORDER BY LOWER(n.name) ASC LIMIT 12", //"like" (=~) search term, case insensitive ((?i)), show first 12 results
},
success: function(data) {
//process json here
};
}
});
감사합니다,
제프
귀하의 쿼리는 글로벌 그래프 검사 한, 꽤/느린 비싼 것입니다 대신 –