0
此問題與SolrJ文檔有關。我有一個實體 ,其中有另一個實體。你能否告訴我如何爲內部實體註釋 ?我正面臨的問題是內部實體字段 索引時丟失。在下面的例子中,它只是添加內容 字段並丟失了作者姓名和ID。SolrJ POJO註釋
示例:「內容」是一個具有「作者」的類,因爲它具有一個關係實體 。
class Content{
@Field("uniqueId")
String id;
@Field("timeStamp")
Long timeStamp;
//What should be the annotation type for this entity?
Author author;
}
class Author{
@Field("authorName")
String authorName;
@Field("authorId")
String id;
}
我的XML模式是:
<field name="uniqueId" type="string" />
<field name="timeStamp" type="long" />
<field name="authorName" type="string" />
<field name="authorId" type="string" />