如何在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
最满意答案
您可以使用正常的构建运行而不是即时运行。
先检查
转到设置/首选项 > 构建,执行,部署选项 > 即时运行并取消选中所有三个框。
升级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)
删除您的构建文件夹
运行项目时,将自动创建构建文件夹
在菜单中的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.
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 )
Delete your build folder
When you run project, build folder will be created automatically
Go to BUILD option in menu > Clean the project, Build the project
It should work without instant run.
相关问答
更多-
从命令行运行gradle ,它会从系统路径调用gradle,这显然是gradle 2.10 当您向gradle.build文件添加包装器部分时(如Android Studio项目的情况),您将在项目根文件夹中看到gradlew.bat和gradlew shell脚本。 这些脚本将调用(并在需要时下载)包装器部分中定义的gradle版本。 TL; DR:运行./gradlew而不是gradle When you run gradle from the command line, it invokes grad ...
-
Android Studio构建工具和gradle版本兼容性(Android Studio build tools and gradle version compatibility)[2022-12-24]
你可以使用*稳定版而不是alpha :) You can use the *stable version and not alpha :) -
您可以使用正常的构建运行而不是即时运行。 先检查 转到设置/首选项 > 构建,执行,部署选项 > 即时运行并取消选中所有三个框。 升级Gradle服务URL: 项目> Gradle> Wrapper> gradle-wrapper.properties 更改URL distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 至 distributionUrl=https\://services.gradle ...
-
我的怀疑是正确的。 运行时,而不是调试,只有一个进程启动,然后即时运行。 所以,现在的问题变成了为什么调试启动2个进程。 但是,我知道这是一个不同的问题,为了清楚起见,我正在关闭这个问题并创建一个新问题。 这是链接 My suspicion was correct. When running, instead of debugging, there's only one process started, and THEN the Instant Run works. So, the question now ...
-
Android Studio版本与使用的Gradle插件不兼容(Version of Android Studio is incompatible with the Gradle Plugin used)[2022-03-06]
此问题可能是由IDE / Gradle错误引起的! 尝试将Gradle版本切换为最新版本或降级为稳定版本, 最新版本: 2.2.0-beta2 最后稳定版本: 2.1.3 您也可以尝试其他版本, 请点击此处 ! This issue may be caused by a IDE/Gradle bug! Try switching the Gradle version to the latest one or by downgrading to a stable release, Latest version ... -
如何在Android Studio Canary 5,6和7上解决Instant Run(How to solve Instant Run on Android Studio Canary 5, 6 and 7)[2022-01-21]
添加此行gradle.properties文件。 它对我有用 android.enableAapt2=false Android Studio 3.0 Canary 5 如果您的构建因资源处理问题而失败。 要暂时禁用AAPT,请在gradle.properties文件中设置android.enableAapt2 = false。 I solved this way: What I did is creating an empty new project in Android Studio 3.0 Cana ... -
它绑定到应用程序的gradle。 https://developer.android.com/studio/run/#instant-run 我假设你已经为应用程序使用过一次。 尝试从目标设备/模拟器中卸载应用程序(并拔下/停止它),然后转到文件 - >使缓存失效并重新启动。 然后看看它是否仍然不让你。 编辑:确保gradle文件更新和版本匹配。 It's tied to the app's gradle. https://developer.android.com/studio/run/#instant- ...
-
我遇到了与cordova应用程序(非离子3)相同的问题。 我卸载了sdk android并且我安装了Android Studio,现在它可以工作了。 I had same issue with cordova app (not ionic 3). I uninstalled sdk android and I installed Android Studio and now it works.
-
gradle版本不兼容(android studio 2.1预览1)
(gradle version incompatible (android studio 2.1 preview 1) [2022-05-01]) 它现在工作正常,bcz我刚刚下载了android支持库rev.28并将appcombat和设计库更改为最新版本。 现在它 compile 'com.android.support:appcompat-v7:23.2.1' compile 'com.android.support:design:23.2.1' 这是迄今为止的最新版本 我学到的东西总是使用稳定版的依赖。 这就是你在这里可以找到的 its working fine now, bcz i m just downloaded android su ... -
工作得很好谢谢。 我安装了java 1.7和1.8,我使用sudo update-alternatives --config javac在终端中使用1.7。 由于某种原因,我相信android使用java 1.8。 我将update-alternatives选项更改为java 1.8。 命令'gradlew tasks'开始按预期工作。 Got it work Thanks. I installed both java 1.7 and 1.8 and I was using 1.7 in the termi ...