couchdbwith POST 메서드에 ajax 요청을 보내서 검색 할 문서의 키 목록을 제공합니다.couchdb offset : 결과가 없습니다.
오프셋은 마지막 줄에 설정되어 있으므로 0 행을 얻는 것을 제외하면 모든 것이 잘 작동하는 것 같습니다.
는 그래서는 것을 의미한다 : 나는 CouchDB를 서버 (cloudant)
- 단지의 offest 함께 제공 목록을 검색하는 것처럼 보이지만 마지막 요소, 즉 빈 목록
또한 결과를 다르게 정렬하려고하면 성공하지 못했습니다. 코드
var riList= ListOfRU.pluck('ri_name');
var queryParams={"keys":riList};
var riResponseList=[];
var ajaxURL= ('_view/'+ self.parentMcDropDownValue);
console.log(ajaxURL, queryParams);
$.ajax({ //retrieve and show on map LABORATORY coordinates
async: true,
url: ajaxURL,
type:"POST",
data:JSON.stringify(queryParams),
dataType: 'json',
timeout:5000,
success:function(response){
console.log("response",response);
riResponseList=response.rows;
},
error:function(){
alert('fetching error');
}
});
크롬 기본적으로 여기에
var riList=["Wire line diamond core drilling rig", "VUA - isotope geochemistry laboratory","Volcanologic and Seismological Observatories","VESOG","Utrecht University - TecLab, Tectonic Laboratory","Utrecht University - Experimental and Analytical Laboratories"];
의 동일
keys: Array[194]
0: "Wire line diamond core drilling rig"
1: "VUA - isotope geochemistry laboratory"
2: "Volcanologic and Seismological Observatories"
3: "VESOG"
4: "Utrecht University - TecLab, Tectonic Laboratory"
5: "Utrecht University - Experimental and Analytical Laboratories"
.....
된다
riList
VAR는 (구글 크롬 개발 도구에서)이 같은 것입니다 개발자 도구 출력
response
Object
offset: 194
rows: Array[0]
total_rows: 194
__proto__: Object
크롬 devtools의 출력에서 볼 수 있듯이 오프셋은 194이므로 마지막 키부터 시작하므로 0 행 배열이 있습니다.
아이디어가 있으십니까?
삭제하지 않으셔서 고맙습니다. 지금 내 결과에 오프셋이 있는데 이유를 알아 내려고 노력 중입니다 ... 오프셋 매개 변수는 정확히 무엇이라고 말합니까? –