In Get Request i get Data when i try using POSTMAN Client.
In same way if try the post request then i wont get data as response
Valid NEST response built from a successful low level call on POST: /bankpayoutsummary/data/_search?typed_keys=true
# Audit trail of this API call:
- [1] PingSuccess: Node: http://localhost:9200/ Took: 00:00:00.0419916
- [2] HealthyResponse: Node: http://localhost:9200/ Took: 00:00:00.2869426
# Request:
{"query":{"term":{"taluka":{"value":"Pauni"}}}}
# Response:
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}
POST Data using Nest it show zero document count.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Nest;
using WebElastic.ConnectionSetter;
using WebElastic.Models;
namespace WebElastic.Controllers
{
public class Default1Controller : Controller
{
private ConnectionToEs ConnectionToEs;
public Default1Controller()
{
ConnectionToEs = new ConnectionToEs();
}
public ActionResult Index()
{
return View();
}
public ActionResult Search(string q)
{
var response = ConnectionToEs.EsClient().Search<Bankpayoutsummary>(s => s
.Index("bankpayoutsummary")
.Type("data")
.Query(m => m.Term(t => t.Field("taluka").Value("Pauni")))); //Search based in _id
var result = response.Documents;
return View("Search", result);
}
}
}
POST Data Response.
what is wrong in POST request.