0
Algolia의 자동 완성 결과를 내 응용 프로그램에 다시 필터링하려고합니다. 내가 algolia에 저장 한 데이터에 draft=0
이 있는지 확인하기 위해 필터를 추가했습니다.Algolia 자동 완성 필터 결과
autocomplete('#search-box', {hint: false}, [
{
source: autocomplete.sources.hits(index, {hitsPerPage: 5}),
displayKey: 'title',
filters: 'draft=0',
templates: {
suggestion: function(suggestion) {
return suggestion._highlightResult.title.value;
}
}
}
지금까지 필터링하지 않고 초안 콘텐츠를 반환합니다. 검색에 표시하고 싶지 않은 기사는 알골미에 관한 나의 색인에 draft: 1
입니다.