0
我的Rails應用程序中有兩個模型:Share和Rent。Elasticsearch Rails基於多個索引的最近記錄
我開始在我的應用程序中使用ElasticSearch,並且想要一種方法將模型租借和共享給最近的人。
我試過如下:
@response = Elasticsearch::Model.search query: {
"indices": {
"indices": [
"shares",
"rents"
],
"query": {
"multi_match": {
"query": "Apartament",
"fields": [ "tipe"]
}
},
"no_match_query": {
"term": {
"": ""
}
},
}
}
但我不知道如何將最新的基於create_at場。