Search – "apple", "cake"

Let us search for "apple" and "cake" together using the cURL command:

$ curl -LX POST -d '["cake", "apple"]' localhost:9090/api/query | jq                                                                                     
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current       
                                 Dload  Upload   Total   Spent    Left  Speed         
100   189  100   172  100    17    172     17  0:00:01 --:--:--  0:00:01 27000        
[                                          
  {                                        
    "title": "Book 3",                     
    "url": "http://file_server:9876/book3" 
  },                                       
  {                                        
    "title": "Book 1",                     
    "url": "http://file_server:9876/book1" 
  },                                       
  {                                        
    "title": "Book 2",                     
    "url": "http://file_server:9876/book2" 
  }                                        
] 

The following are the docker-compose logs when we search for "apple" and "cake":

concierge_1         | 2018/01/21 20:31:06 http://a_m_librarian:6060/api -> api.queryResult{Count:3, Data:[]api.docs{api.docs{DocID:"3c9c56d31ccd51bc7ac0011020819ef38ccd74a4", Score:3}, api.docs{DocID:"7bded23abfac73630d247b6ad24370214fe1811c", Score:2}, api.docs{DocID:"28582e23c02ed3f14f8b4bdae97f91106273c0fc", Score:1}}}
concierge_1         | 2018/01/21 20:31:06 http://n_z_librarian:7070/api -> api.queryResult{Count:0, Data:[]api.docs{}}
concierge_1         | 2018/01/21 20:31:06 ---------------------------
concierge_1         | 2018/01/21 20:31:06 WARN: http://others_librarian:8080/api -> Post http://others_librarian:8080/api/query: http: ContentLength=16 with Body length 0
concierge_1         | 2018/01/21 20:31:06 ---------------------------
concierge_1         | []api.document{api.document{Doc:"apple cake cake whale", Title:"Book 3", DocID:"3c9c56d31ccd51bc7ac0011020819ef38ccd74a4", URL:"http://file_server:9876/book3"}, api.document{Doc:"apple apple cat zebra", Title:"Book 1", DocID:"7bded23abfac73630d247b6ad24370214fe1811c", URL:"http://file_server:9876/book1"}, api.document{Doc:"banana cake zebra", Title:"Book 2", DocID:"28582e23c02ed3f14f8b4bdae97f91106273c0fc", URL:"http://file_server:9876/book2"}}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.15.99