首页 \ 问答 \ 添加+到facet结果(add + to facet result)

添加+到facet结果(add + to facet result)

我需要添加+到facet结果。 喜欢这个:

"facet_counts": {
  "facet_queries": {},
  "facet_fields": {
    "color": [
      "red", +74,
      "white", +53
...

有没有办法使用solr查询或solrj执行此操作?


i need to add + to facet results. Like this:

"facet_counts": {
  "facet_queries": {},
  "facet_fields": {
    "color": [
      "red", +74,
      "white", +53
...

Is there a way to do this using solr queries or solrj?


原文:https://stackoverflow.com/questions/31903789
更新时间:2021-07-28 10:07

最满意答案

有多种方法可以自动启动AWS EC2实例。

  • 使用已安装的软件创建AMI,并使用AMI和AWS Web Console配置新服务器。
  • 在“用户数据”一节中定义创建CloudFormation脚本并使用Shell脚本(或Windows中的命令行脚本)自动安装软件。 在这里,您可以重新使用S3中的CloudFormation存储来创建新的实例。
  • 使用AWS CLI(包含脚本的Shell命令)或AWS SDK(例如Python boto3包)来配置环境。 为此,您需要创建一个IAM用户(或角色,如果脚本在EC2实例中执行),并具有设置资源所需的权限。

此外,您可以结合使用这些选项,以便于维护。 例如,如果您计划为每个部署设置VPC,网络等,则最好在CloudFormation中保留基础架构配置,同时可能是设置用Boto3编写的EC2实例。 您可以触发Boto3中CloudFormation和其他代码的执行。

请参阅文章使用Python自动化AWS和LinuxAcademy中的Boto3一步一步指南。


There are multiple approaches to automate launching AWS EC2 instances.

  • Creating a AMI with the installed software, and using the AMI and AWS Web Console to provision new servers.
  • Creating a CloudFormation Script and having Shell Scripts(Or commandline scripts in Windows) to automate the installation of the software define in "User Data" section. Here you can re-use the CloudFormation storing in S3 for creating new instances.
  • Use AWS CLI (Shell commands with scripts) or AWS SDKs (e.g Python boto3 package) to provision the environments. For this you need to create a IAM user (Or Role, if the scripts executes inside an EC2 instance) with required permission to provision the resources.

In addition you can use a combination of these options, to make it easier to maintain. For example, if you plan to setup VPC, Network & etc. for each deployment, its better to keep the infrastructure provisioning in CloudFormation while, may be the setting up of EC2 instance written in Boto3. You can trigger the execution of both CloudFormation and other code in Boto3.

Refer the article Automating AWS With Python and Boto3 from LinuxAcademy for step by step guide.

相关问答

更多
  • aws ec2 describe-instances \ --query "Reservations[*].Instances[*].PublicIpAddress" \ --output=text 另一种方式是 curl --silent http://ipecho.net/plain 这将返回实例的公共IP aws ec2 describe-instances \ --query "Reservations[*].Instances[*].PublicIpAddress" \ --o ...
  • 你当然完成了你的研究! 1.规范化 是的,1 x t2.large (8GB RAM)= 8 x t2.micro (1GB RAM)= 4 x t2.small (2GB RAM)。 2.规范化课程 标准或可转换的工作,但确保它是区域RI(没有指定AZ)。 如果指定了AZ,则它包括容量预留但没有规范化。 3&4。跨家庭的正常化 不,RI只能在同一家族中工作(例如m4 )。 5.整个合并账户 RI传统上跨越由Consolidated Billing链接的帐户,因此我认为规范化也会以这种方式工作。 优先购买R ...
  • 无需base64自己编码数据。 你可以用文件前缀文件名/路径:// 所以, aws ec2 run-instances --user-data file://my_script 要么 aws ec2 run-instances --user-data file:///full/path/to/my_script There is no need to base64 encode the data yourself. You can prefix a file name/path with file:// ...
  • 此请求已经搁置了很长时间,AWS最终在March 2017年March 2017对此提出了支持。 请参阅: Amazon EC2和Amazon EBS添加了对创建时标记资源和其他资源级权限的支持 确保您的AWS CLI版本至少为1.11.106 $ aws --version aws-cli/1.11.109 Python/2.6.9 Linux/4.1.17-22.30.amzn1.x86_64 botocore/1.5.72 CLI在启动时标记实例: 以下示例将带有webserver密钥和produc ...
  • 只要您将计算环境创建为托管计算环境而不是非托管,就可以使用AWS Batch完成这种自动缩减。 但是,在ECS中使用任务意味着必须手动清理和删除EC2资源 。 它可以内置于您的应用程序的一部分中,也可以使用CloudFormation进行管理,但缩小这些资源最终将成为您的责任。 This automatic downscaling can be done using AWS Batch as long as you create the Compute Environment as a Managed Co ...
  • 有多种方法可以做到这一点。 我的首选方法是不要直接与服务器连接,而是在部署新版本软件时创建新的AMI。 为此,请为Auto-scaling组使用AutoScalingRollingUpdate属性。 然后,当您更改ImageId以用于启动配置时,AWS会自动使用新的旧服务器作为滚动升级来替换旧服务器。 我有一个简单的部署脚本,用于创建新的AMI,替换模板中的ImageId ,然后执行堆栈更新 - AWS负责其余部分。 There are multiple ways of doing this. My pre ...
  • 有多种方法可以自动启动AWS EC2实例。 使用已安装的软件创建AMI,并使用AMI和AWS Web Console配置新服务器。 在“用户数据”一节中定义创建CloudFormation脚本并使用Shell脚本(或Windows中的命令行脚本)自动安装软件。 在这里,您可以重新使用S3中的CloudFormation存储来创建新的实例。 使用AWS CLI(包含脚本的Shell命令)或AWS SDK(例如Python boto3包)来配置环境。 为此,您需要创建一个IAM用户(或角色,如果脚本在EC2实例 ...
  • BlockDeviceMappings:[{ DeviceName:'/dev/sda1', Ebs:{ VolumeSize:8, DeleteOnTermination:true, VolumeType:"gp2", } }] BlockDeviceMappings:[{ DeviceName:'/dev/sda1', Ebs:{ VolumeSize:8, DeleteOnTermination:true, VolumeType:"gp2", } }]
  • 如果您希望坚持通过特定的boto3 API调用进行部署,那么您需要遵循这个粗略的boto3 API调用序列: 使用get_rest_apis检索API ID。 可能使用get_deployments检查它是否已部署。 使用create_deployment创建部署。 使用stageName参数指定要创建的阶段。 如果需要,请考虑使用create_base_path_mapping 。 如果需要打开日志记录等内容,还可以考虑使用update_stage 。 If you want to stick with ...
  • 文本输出格式有点难看,因为它为每个实例打印多行,但这是一个工作版本: aws ec2 describe-instances --query "Reservations[].Instances[].[State.Name, Tags[?Key=='Name'].Value[]]" --filter Name=tag:Name,Values="${userinput}" --output text 我无法弄清楚如何仅使用AWS CLI工具将每个实例放在一行上,但是这里有一个版本,通过管道连接到每个实例打印一行 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。