Page History
...
Info |
---|
NestClient를 활용하여 검색 필터 기능,인덱싱 기능을 살펴봅시다. |
전체 인덱싱
Code Block | ||
---|---|---|
| ||
public async Task<int> ReindexAll() { await _elasticClient.DeleteByQueryAsync<SearchGoods>(q => q.MatchAll()); var allGoods = await FindAll(); foreach (var item in allGoods) { // 키워드 검색대상 추가 item.terms = $"{item.nameKr} {item.category1} {item.category2} {item.category3} {item.terms}"; await _elasticClient.IndexDocumentAsync(item); } return allGoods.Count; } |
...