|
|
@@ -42,10 +42,12 @@ public class SearchDoc {
|
|
|
private String caseId;
|
|
|
|
|
|
/**
|
|
|
- * 业务行主键(原 Lucene 存储字段)
|
|
|
+ * 业务行主键(原 Lucene 存储字段)。注意:不能命名为 {@code id}——
|
|
|
+ * spring-data 会把名为 id 的字段识别为 id 属性候选,与 {@link #docId} 的
|
|
|
+ * {@code @Id} 冲突,启动即抛 MappingException
|
|
|
*/
|
|
|
@Field(type = FieldType.Keyword)
|
|
|
- private String id;
|
|
|
+ private String rowId;
|
|
|
|
|
|
@Field(type = FieldType.Keyword)
|
|
|
private String sheetId;
|
|
|
@@ -82,7 +84,7 @@ public class SearchDoc {
|
|
|
*/
|
|
|
public SearchDoc(String id, String sheetId, String fileId, LocalDateTime dateTime,
|
|
|
String content, String tableName, String fileName, String sheetName) {
|
|
|
- this.id = id;
|
|
|
+ this.rowId = id;
|
|
|
this.sheetId = sheetId;
|
|
|
this.fileId = fileId;
|
|
|
this.dateTime = dateTime;
|