ES查询如下:
var searchResponse = client.Search<ItemSearch>(s => s
.Query(q => q
.MultiMatch(mm => mm
.Query(searchQuery)
.Type(TextQueryType.BestFields)
.Fields(f => f.Field(p => p.Description).Field(p=>p.Comment).Field(p => p.CommentSmall)
.Field(p => p.DisplaySequence).Field(p => p.ImageUrl).Field(p => p.ItemBrandDescription)
.Field(p => p.ItemBrandSequence).Field(p => p.ItemCode)
.Field(p => p.ItemGroupID).Field(p => p.ItemGroupSpecification).Field(p => p.ItemMaximumOrderAmount)
.Field(p => p.ItemMinimumOrderAmount).Field(p => p.ItemSpecsDescription).Field(p => p.ItemSupplierCode)
.Field(p => p.PackSize).Field(p => p.PriceUnit).Field(p => p.Sequence).Field(p => p.Stock).Field(p => p.StockToday).Field(p => p.StockTomorrow)
.Field(p => p.SupplierCode).Field(p => p.UOM).Field(p => p.UOMTypeID).Field(p => p.UOMTypeDescription)
).Query(searchQuery)
)
));
收到关注错误,有人可以帮帮我吗?
ServerError:ServerError: 400Type: search_phase_execution_exception Reason: "all shards failed"
DebugInformation:Invalid NEST response built from a unsuccessful low level call on POST: /myindex2-solvi/itemsearch/_search
# Audit trail of this API call:
- [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.2664112
# ServerError: ServerError: 400Type: search_phase_execution_exception Reason: "all shards failed"
# OriginalException: System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData)
# Request:
<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
# Response:
<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
IsValid:False
OriginalException:System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData)