Added optional hits request parameter for number of candidates to retrieve
Added optional qid request parameter for query id
Changed to output / results format to match jsonl
Web app now shows all fields and values of retrieved candidates
Sample API output:
{
"query": {
"text": "How does the process of digestion and metabolism of carbohydrates start",
"qid": ""
},
"candidates": [
{
"docid": "msmarco_v2.1_doc_21_715459015#0_1497635726",
"score": 17.8073,
"doc": {
"url": "https://healthyeating.sfgate.com/digestion-metabolism-carbohydrates-8090.html",
"title": "Digestion & Metabolism of Carbohydrates | Healthy Eating | SF Gate",
"headings": "Digestion & Metabolism of Carbohydrates\nDigestion & Metabolism of Carbohydrates\nMouth\nDigestive Tract\nSimple and Complex\nMetabolism\n",
"segment": "Digestion & Metabolism of Carbohydrates | Healthy Eating | SF Gate\nDigestion & Metabolism of Carbohydrates\nHealthy Eating\n|\nDiet\n|\nDigestion\nBy Gigi Chow Updated December 14, 2018\nThe goal of digestion and absorption of carbohydrates is to break them down into small molecules of sugar known as glucose. Glucose is a primary fuel that drives the metabolism and function of every cell in the body. For example, the brain and red blood cells depend on glucose for energy because they do not use fat or protein under normal circumstances. The ingestion, digestion and metabolism of carbohydrates are therefore critical for all bodily functions. Mouth\nAccording to the book, “Understanding Nutrition,\" carbohydrate digestion begins in the mouth. The action of chewing food stimulates the flow of saliva and within the saliva, an enzyme known as amylase starts the process of breaking down carbohydrates. Because food does not remain in the mouth for very long, the digestion of carbohydrates in the mouth is minor compared to what takes place elsewhere in the digestive tract . Digestive Tract\nThe actions of chewing and swallowing food stimulate the stomach to release stomach acid, which continues to break down the carbohydrates, although the acid itself has no specific enzymes to digest carbohydrates. The mass of partially digested carbohydrates is then emptied from the stomach into the small intestines in a process known as gastric emptying. Once the partially digested carbohydrates arrive to the small intestine, more enzymes are released to further break down the carbohydrates into glucose molecules.",
"start_char": 0,
"end_char": 1609
}
},
...
Sample API output: