Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var formatted_results = []
- const map_to_list = function(result){
- obj = {"ref" : result.document.id,
- "score" : result.score,
- "doc" : result.document}
- console.log(obj)
- // formatted_results.push(obj)
- }
- formatted_results = search_results.on('data', map_to_list)
Add Comment
Please, Sign In to add comment