我收到了这个未定义的字段'活跃'错误,但架构中存在活动字段。这之前没有任何错误,突然出现此错误: 我的索尔文件:
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class SDocument {
@Id
@Field
private String indexId;
@Field("code")
private String code;
@Field("name")
private String name;
@Field("active")
private Boolean active;
}
我使用带有solrCrudRepository的spring boot并且查询是
@Query(value = "code:?0* name:?0*", filters = "active:?1")
List<SDocument> findAllergenList(String searchKey, Boolean isActive);
org.springframework.data.solr.UncategorizedSolrException: undefined field active; nested exception is org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: undefined field active
at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:136)
at org.springframework.data.solr.core.SolrTemplate.count(SolrTemplate.java:154)
at org.springframework.data.solr.repository.query.AbstractSolrQuery$CollectionExecution.count(AbstractSolrQuery.java:435)
at org.springframework.data.solr.repository.query.AbstractSolrQuery$CollectionExecution.execute(AbstractSolrQuery.java:415)
at org.springframework.data.solr.repository.query.AbstractSolrQuery.execute(AbstractSolrQuery.java:149)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:415)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:393)