Skip to content

Commit

Permalink
fixed bug #34
Browse files Browse the repository at this point in the history
获取索引表字段信息时报错org.frameworkset.elasticsearch.ElasticSearchException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
  • Loading branch information
yin-bp committed Nov 3, 2020
1 parent 5faeca0 commit 303e8d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class IndexField implements Serializable {
private String normalizer;
private Object boost;
private Boolean coerce;
private String copyTo;
private Object copyTo;
private Boolean docValues;
private Boolean dynamic;
private Boolean enabled;
Expand Down Expand Up @@ -75,11 +75,11 @@ public void setCoerce(Boolean coerce) {
this.coerce = coerce;
}

public String getCopyTo() {
public Object getCopyTo() {
return copyTo;
}

public void setCopyTo(String copyTo) {
public void setCopyTo(Object copyTo) {
this.copyTo = copyTo;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2393,7 +2393,7 @@ public static IndexField buildIndexField(Map.Entry<String,Object> field,List<Ind
indexField.setNormalizer((String)fieldInfo.get("normalizer"));
indexField.setBoost(fieldInfo.get("boost"));
indexField.setCoerce(parseBoolean( fieldInfo.get("coerce")));
indexField.setCopyTo((String)fieldInfo.get("copy_to"));
indexField.setCopyTo(fieldInfo.get("copy_to"));
indexField.setDocValues(parseBoolean(fieldInfo.get("doc_values")));//setCoerce();
indexField.setDynamic(parseBoolean(fieldInfo.get("doc_values"))); //dynamic
indexField.setEnabled(parseBoolean(fieldInfo.get("enabled"))); //enabled
Expand Down
4 changes: 2 additions & 2 deletions bboss-elasticsearch-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dependencies {
project(':bboss-elasticsearch-rest')
)
compileOnly(
[group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '2.3.4.RELEASE', transitive: true],
[group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.3.4.RELEASE', transitive: true]
[group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '2.3.5.RELEASE', transitive: true],
[group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.3.5.RELEASE', transitive: true]
)
// compile project(':bboss-elasticsearch-rest-jdbc')
// compile "org.springframework.boot:spring-boot-starter-data-redis:+"
Expand Down

0 comments on commit 303e8d0

Please sign in to comment.