2014-07-07 5 views
0

메신저 0.9에서 현재 버전 "1.2"로 탄성 검색으로 업그레이드. 분류가 다른 것 같습니다.탄성 검색 1 정렬

{ 
    "from": 0, 
    "size": 100, 
    "sort": {"title": "asc"}, 
    "query": { 
    "filtered": { 
     "query": { 
     "match_all": {} 
     }, 
     "filter": { 
     "and": { 
      "filters": [ 
      { 
       "term": { 
       "entityBase": 1 
       } 
      } 
      ] 
     } 
     } 
    } 
    } 
} 

그리고 결과의 일부 :

{ 
    "took": 1, 
    "timed_out": false, 
    "_shards": { 
     "total": 10, 
     "successful": 10, 
     "failed": 0 
    }, 
    "hits": { 
     "total": 12, 
     "max_score": null, 
     "hits": [ 
      { 
       "_index": "ibyenintegrationtest", 
       "_type": "entity", 
       "_id": "4", 
       "_score": null, 
       "_source": { 
        "id": 4, 
        "entityVersion": 0, 
        "entityBase": 1, 
        "title": "Zoologisk Have 123", 
        "created": "2014-07-07T10:06:56.0757324+02:00", 
        "categories": [ 
         "otherplace" 
        ], 
        "tags": [], 
        "prices": { 
         "average": -1, 
         "lower": 0, 
         "upper": 1.7976931348623157e+308 
        }, 
        "locations": [ 
         { 
          "id": 4, 
          "name": "Zoologisk Have 123" 
         } 
        ], 
        "articleReferences": [], 
        "bookingTypes": [] 
       }, 
       "sort": [ 
        "123" 
       ] 
      }, 
      { 
       "_index": "ibyen", 
       "_type": "entity", 
       "_id": "94813", 
       "_score": null, 
       "_source": { 
        "id": 94813, 
        "entityVersion": 1, 
        "entityBase": 1, 
        "title": "3 parker i København", 
        "created": "2014-04-25T03:30:15.5133281+02:00", 
        "categories": [ 
         "otherplace" 
        ], 
        "tags": [], 
        "prices": { 
         "average": -1, 
         "lower": 0, 
         "upper": 1.7976931348623157e+308 
        }, 
        "locations": [ 
         { 
          "id": 94813, 
          "name": "3 parker i København", 
          "geoPoint": { 
           "lat": 55.6760968, 
           "lon": 12.5683371 
          }, 
          "streetName": "Øster Voldgade", 
          "zipCode": "1350", 
          "city": "København K", 
          "district": "indre-by" 
         } 
        ], 
        "articleReferences": [], 
        "bookingTypes": [] 
       }, 
       "sort": [ 
        "3" 
       ] 
      }, 
... 

캔트 정말에서 볼 나는 필드 ES는 ES 일치하는 텍스트의 숫자 프로그래머에 의해 정렬됩니다 정렬, 그것은 보인다해야한다고 설정하면 정렬이 어떻게 작동해야하는지, 또는 텍스트의 숫자와 일치하지 않도록 정의하는 방법에 대한 문서.

+0

. 그리고 그 숫자가 마지막 일 때조차도. – eble

답변

0

필드가 분석되어 토큰 화되었습니다. 매핑에

봐 (기본값을 분석해있다) 당신이 문자열의 번호로 정렬 결과에서 "종류"에서 볼 수 있듯이