小编occ*_*red的帖子

获得百里香的春季应用环境

我的Spring Boot应用程序运行3个配置:

  • application.properties - >用于开发环境
  • application-test.properties - >用于测试环境
  • application-production.properties - >用于生产环境

如何进入百里香叶环境应用程序正在运行?

我只需要在生产环境中包含Google Analytics代码.

environment spring thymeleaf spring-boot

28
推荐指数
2
解决办法
9347
查看次数

ElasticSearch中的聚合不同值

我正在尝试在ElasticSearch中获取不同的值及其数量.

这可以通过以下方式完成:

"distinct_publisher": {
        "terms": {
            "field": "publisher", "size": 0
        }
    }
Run Code Online (Sandbox Code Playgroud)

我的问题是它计算了条款,但是如果出版商中的值通过空格分隔,例如:"鸡狗"和5个文件在发布商字段中有此值,那么我得到5为鸡,5为狗:

"buckets" : [
            {
                "key" : "chicken",
                "doc_count" : 5
            },
            {
                "key" : "dog",
                "doc_count" : 5
            },
            ...
        ]
Run Code Online (Sandbox Code Playgroud)

但我希望得到结果:

"buckets" : [
            {
                "key" : "Chicken Dog",
                "doc_count" : 5
            }
        ]
Run Code Online (Sandbox Code Playgroud)

elasticsearch

2
推荐指数
1
解决办法
605
查看次数