2016-11-08 3 views
0

문제는 기본적으로 어떤 쿼리를 작성하든 elasticsearch로 전송되지 않습니다. 이것에 대한 예를 들어 :NEST 5.0.0-rc1에서 쿼리 할 때 빈 요청이 전송되었습니다.

_elasticClient.SearchAsync<CostSearch>(d => 
       d.Query(q => 
        q.Match(f => f.Field(c => c.AgencyTrackingNo == costQuery.Query)) 
       ) 
      ); 

전송 요청은 내가 그 인덱스 및 유형의 모든 값을 받고 있어요 의미 빈 개체이다. 다음과 같은 로그에 것을 확인할 수 있습니다

[11시 47분 36초 INF] POST http://localhost:9200/costs/costsearch/_search 요청 : {} 상태 : (200)

{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hit 
s":{"total":1,"max_score":1.0,"hits":[{"_index":"costs","_type":"costsearch","_i 
d":"1","_score":1.0,"_source":{ 
    "id": "-0897-98df7-df8-96", 
    "title": "Test cost", 
    "budget": 12323.34, 
    "contentType": "Photo", 
    "agencyTrackingNo": "GL036001V", 
    "agencyProducer": "Grey, New York", 
    "costOwner": "John Doe guid", 
    "stage": "Draft", 
    "approvalStatus": "ToBeApproved", 
    "ioNumber": "IO123854B", 
    "initiative": "Gillete 2016", 
    "budgetRegion": "Japan", 
    "country": "countryid", 
    "city": "cityid", 
    "userGroups": ["1987", "1986"] 
} 
}]} 

답변

1

내 나쁜, 나는 오용되었다 밝혀 필드 선택 자.

_elasticClient.SearchAsync<CostSearch>(d => 
       d.Query(q => 
        q.Match(f => f.Field(c => c.AgencyTrackingNo).Query(costQuery.Query)) 
       ) 
      );