public string MyQuestions(string OwnerUserId) { var elasticService = new ElasticSearchHttpService(); var result = elasticService.QuestionsByUser(OwnerUserId); return(result); }
// POST: api/Search public HttpResponseMessage Post(Post post) { var elasticService = new ElasticSearchHttpService(); string result = elasticService.MoreLikeThisContent(post.Body, post.PostTypeId.ToString()); return(this.Request.CreateResponse(HttpStatusCode.OK, result)); }
public HttpResponseMessage Post(Document document) { var elasticService = new ElasticSearchHttpService(); string result = elasticService.InsertDocument(document); return(this.Request.CreateResponse(HttpStatusCode.OK, result)); }
// DELETE: api/Document/5 public HttpResponseMessage Delete(int id) { var elasticService = new ElasticSearchHttpService(); elasticService.DeleteDocument(id); return(this.Request.CreateResponse(HttpStatusCode.OK)); }
// GET: api/Document/5 public string Get(int id) { var elasticService = new ElasticSearchHttpService(); var result = elasticService.AsnwersForQuestion(id); return(result); }