首页 \ 问答 \ 如何在Apache solr上进行构面组查询(How to do facet group query on Apache solr)

如何在Apache solr上进行构面组查询(How to do facet group query on Apache solr)

我正在对solr进行一个方面的查询..这给了我各个方面的方面和计数...但是现在我想在方面上执行一个组查询..这让我按照组计数...

以下是数据

第1项:耐克鞋(尺码:8,9,10)第2项:Reebok鞋(尺码:8,9,10)

现在在这种情况下,我的品牌facet查询返回结果如下

  • 耐克:3

  • 锐步:3

我需要的结果是

  • 耐克:1
  • 锐步:1

问候


I am doing a facet query on solr.. Which gives me facets and its count for each item... But now I want to perform a group query on facets.. Which gives me count according to group...

Example

Below is the data

Item1: Nike shoes (size:8,9,10) Item2 : Reebok Shoes(size:8,9,10)

Now in this case my brand facet query returns me result as below

  • Nike:3

  • Reebok:3

The result I required is

  • Nike:1
  • Reebok:1

Regards


原文:https://stackoverflow.com/questions/11739586
更新时间:2022-08-02 12:08

最满意答案

您可以使用正常的构建运行而不是即时运行。

先检查

转到设置/首选项 > 构建,执行,部署选项 > 即时运行取消选中所有三个框。

  1. 升级Gradle服务URL:

    项目> Gradle> Wrapper> gradle-wrapper.properties

    更改URL

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 
    

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
    

(查找最新的distributionUrl毕业插件版本这里: http ://services.gradle.org/distributions

**请务必使用gradle-x.xx-all.zip)

  1. 删除您的构建文件夹

    运行项目时,将自动创建构建文件夹

  2. 在菜单中的BUILD选项>清理项目,构建项目

    它应该没有即时运行。


You can use normal build run rather than instant run.

Check first

Go to Settings/Preferences > Build, Execution, Deployment option > Instant Run and uncheck all the three boxes.

  1. Upgrading Gradle services URL:

    Project > Gradle > Wrapper > gradle-wrapper.properties

    Change URL from

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 
    

    to

    distributionUrl=https\://services.gradle.org/distributions/gradle-2.11-all.zip
    

(Find latest distributionUrl gradle plugin version Here: http://services.gradle.org/distributions

**Make sure to use gradle-x.xx-all.zip )

  1. Delete your build folder

    When you run project, build folder will be created automatically

  2. Go to BUILD option in menu > Clean the project, Build the project

    It should work without instant run.

相关问答

更多