我已将SOLR核心文档移至ElasticSearch索引。现在我需要将我的SOLR查询参数转换为ES格式。我在这里看到了ES文档https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html,但ES没有所有 URI 查询参数,其名称类似于 fq , group ,提升,方面等
从我在下面的文档中了解SOLR和ES之间的查询参数映射。可能是我想念别人,请让我知道。
SOLR to ES :fl - > _source,q - > q,行 - >尺寸,开始 - > from,sort-> sort
我知道我可以使用ES的查询字符串和源参数,但我不想使用它(因为那时我需要更改我当前的很多系统)。在这里查看@Val的答案Convert Elasticsearch kibana query string format to URI Search format
我的最终目标是使用 ES 转换下面的 SOLR 查询,但使用URI搜索参数而非查询字符串。 我可以在URI搜索SOLR上设置所有参数
{
"facet": "true",
"sort": "",
"facet.mincount": "1",
"indent": "true",
"facet.limit": "-1",
"group.limit": "48",
"wt": "json",
"rows": "48",
"fl": "id,code:feed_provider_id,feed_provider_id,feed,property_name,pax:occupancy,bedroom_count,min_stay,star_rating,night_rate_min,currency,picture:feature_image,latlon,image_count,display,parent_path,categories,rating,min_stay,archived,feed_provider_url,featured,direct,rating,ha_24_hour_response_s,base_usd_currency:currency(night_rate_min,'USD')",
"facet.query": "{!key='Other'}(-property_type_categories:*)",
"start": "0",
"q": "(((latlon:[48.815573,2.225193 TO 48.9021449,2.4699208]) AND (country:france OR country:FRANCE OR country_code:FR OR country_code:fr)) OR (parent_path:*,187147,* OR location_id:187147))",
"group.field": "feed",
"facet.field": [
"amenity_category",
"property_type_categories"
],
"group": "true",
"group.offset": "0",
"fq": [
"-latlon:0.001,0.001",
"published:1",
"night_rate_min:[0.01,USD TO 100000,USD]",
"feed:11 OR feed:12 OR feed:13 OR feed:14",
"night_rate_min:[75,EUR TO 250,EUR]",
"-booked_date:[2018-02-23T00:00:00Z TO 2018-02-26T00:00:00Z] AND min_stay:[* TO 3]",
"occupancy:[3 TO *]",
"property_type_categories:('cabin' OR 'house')"
]
}
所以,我的基本问题是
是否可以使用URI搜索参数将上述SOLR查询完全转换为ES格式?
或
我需要同时使用URI搜索和查询字符串参数吗?
请建议我如何在ES格式上隐藏我当前的查询?