我正在尝试创建一个测试分析器来试验对弹性搜索的分析。我创建了一个名为“mytest”的索引,该索引可用且可搜索,但是当我尝试创建自定义分析器时,出现以下错误
{
"error": "ElasticsearchIllegalArgumentException[Can't update non dynamic settings[[index.analysis.analyzer.content.type, index.analysis.analyzer.content.tokenizer]] for open indices [[mytest]]]",
"status": 400
}
Run Code Online (Sandbox Code Playgroud)
现在我不确定更新设置的限制,但我在文档中找不到任何内容。我可以在创建索引时创建分析,但更新不起作用。
使用下面的源创建分析器
PUT mytest/_settings
{
"analysis" : {
"analyzer":{
"content":{
"type":"custom",
"tokenizer":"whitespace"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗 ?
使用如下 yaml 配置,我尝试使用 default_car 作为列表中的项目之一并覆盖颜色属性。
但有一个解析错误指出:did not find expected key while parsing a block mapping
default_car: &default_car
brand: xxx
model: xxx
color: red
cars_sold:
- <<: *default_car
color: blue
cars_available:
- <<: *default_car
color: yellow
Run Code Online (Sandbox Code Playgroud)
有可能实现这样的目标吗?如果我的做法是错误的,那么避免一次又一次重复默认汽车映射的最佳方法是什么?
我一直在考虑两个问题.无法在互联网上找到任何关于此的资源.dbms如何处理它?或者他们呢?尤其是Oracle.
在提出问题之前,这里有一个例子:假设我有一个主表"MASTER"和从表"SLAVE".主表有一个"ID"列,它是主键,索引由Oracle创建.Slave表具有引用主表和"SLAVE_NO"的外键"MASTER_ID".这两个一起是slave表的主键,它再次被索引.
**MASTER** | **SLAVE**
(P) ID <------> (P)(F) MASTER_ID
(P) SLAVE_NO
Run Code Online (Sandbox Code Playgroud)
现在的问题;
1-如果MASTER_ID是一个自动增量列,并且没有删除任何记录,这是否会使表的索引不平衡?Oracle是否会定期重建索引?据我所知,Oracle仅在构建时平衡索引分支.Oracle是否会自动重建索引?如果水平上升到某个高水平?
2-假设Oracle不会自动重建,除了安排定期重建索引的作业之外,订购SLAVE表的主键列是否更明智?我的意思是代替"MASTER_ID","SLAVE_NO"将其命名为"SLAVE_NO","MASTER_ID"i,它会帮助奴隶表的b树索引更加平衡吗?(那么每个主表可能没有确切数量的从属记录,但仍然看起来好于逆序)
有人知道这件事吗?还是意见?
我有一个动态查询数据库以在页面上显示数据的网页,类似于Toad等数据库工具(当然不是关闭:),仅用于说明的示例).
问题是在页面上显示时数据被修剪.这是我使用JSF显示数据的方式
<h:outputText value="#{record[columnIndex].toDisplayString()}" />
Run Code Online (Sandbox Code Playgroud)
我相信这是关于HTML渲染.我该怎么办?写一个HTML编码器?怎么样?帮助将受到高度赞赏.
我在Tomcat7上使用Spring 3.2和Spring-security 3.1以及jsf + primefaces和hibernate4
我想添加一个并发控件来限制用户的会话,如果他/她尝试第二次登录则显示和错误消息.问题是.我可以在chrome和firefox中登录.它不会阻止多次登录.您可以看到我的安全配置.并且在首次登录和第二次登录时生成的日志出现了什么问题?
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<security:http pattern="/resources/**" security="none" />
<security:http pattern="/authentication/**" security="none" />
<security:http auto-config='true'
access-decision-manager-ref="accessDecisionManager">
<security:intercept-url pattern="/pages/**"
access="PRV_LOGIN" />
<security:access-denied-handler
error-page="/error/error.jsf" />
<security:logout logout-success-url="/" logout-url="/logout"
delete-cookies="JSESSIONID" />
<security:form-login login-page='/login'
login-processing-url="/logincheck" default-target-url="/home"
always-use-default-target="true" />
<security:session-management
invalid-session-url="/login">
<security:concurrency-control
error-if-maximum-exceeded="true" max-sessions="1" expired-url="/login"
session-registry-ref="sessionRegistry" />
</security:session-management>
</security:http>
<security:authentication-manager>
<security:authentication-provider
user-service-ref="userSessionDetailsUtil">
<security:password-encoder ref="passwordEncoderUtil">
<security:salt-source user-property="username" />
</security:password-encoder>
</security:authentication-provider>
</security:authentication-manager>
<!-- Security(Authentication, Encoding) implementations -->
<bean id="userSessionDetailsUtil" class="com.i2i.copycat.service.util.UserSessionDetailsUtil">
</bean>
<bean id="passwordEncoderUtil" class="com.i2i.copycat.service.util.PasswordEncoderUtil">
<property name="passwordEncoder" ref="springShaPasswordEncoder"></property>
</bean> …
Run Code Online (Sandbox Code Playgroud) indexing ×2
analyzer ×1
b-tree ×1
database ×1
java ×1
jsf ×1
oracle ×1
performance ×1
whitespace ×1
yaml ×1