diff --git a/index/scorch/scorch.go b/index/scorch/scorch.go index 99c345bee..5e6304f35 100644 --- a/index/scorch/scorch.go +++ b/index/scorch/scorch.go @@ -566,6 +566,10 @@ func (s *Scorch) StatsMap() map[string]interface{} { return m } +func (s *Scorch) Analyze(d index.Document) { + analyze(d) +} + func analyze(d index.Document) { d.VisitFields(func(field index.Field) { if field.Options().IsIndexed() { diff --git a/index/upsidedown/analysis.go b/index/upsidedown/analysis.go index ca877c40b..1ebd1918e 100644 --- a/index/upsidedown/analysis.go +++ b/index/upsidedown/analysis.go @@ -33,6 +33,10 @@ type AnalysisResult struct { Rows []IndexRow } +func (udc *UpsideDownCouch) Analyze(d index.Document) *AnalysisResult { + return udc.analyze(d) +} + func (udc *UpsideDownCouch) analyze(d index.Document) *AnalysisResult { rv := &AnalysisResult{ DocID: d.ID(), diff --git a/test/tests/sort/searches.json b/test/tests/sort/searches.json index 7f7e8e208..8b06d5382 100644 --- a/test/tests/sort/searches.json +++ b/test/tests/sort/searches.json @@ -170,14 +170,14 @@ } }, { - "comment": "sort by age, descending, missing first", + "comment": "sort by age, descending, missing first, id, ascending", "search": { "from": 0, "size": 10, "query": { "match_all":{} }, - "sort": [{"by":"field","field":"age","missing":"first","desc":true}] + "sort": [{"by":"field","field":"age","missing":"first","desc":true},{"by":"id","desc":false}] }, "result": { "total_hits": 6,