It's very common that we store multiple related types of documents in one collections. It would be great if spring-solr-data support this natively.
One approach is to add an annotation @DocumentType, then change SolrTemplate's methods such as save,findXXX to check whether @DocumentType exists and handle it accordingly.
class Type1 { @DocumentType(fieldName="type", fieldValue="type2")
private String type;
}
class Type2 { @DocumentType(fieldName="type", fieldValue="type2")
private String type;
}
jefferyyuan opened DATASOLR-350 and commented
It's very common that we store multiple related types of documents in one collections. It would be great if spring-solr-data support this natively.
One approach is to add an annotation
@DocumentType
, then change SolrTemplate's methods such as save,findXXX to check whether@DocumentType
exists and handle it accordingly.class Type1 {
@DocumentType
(fieldName="type", fieldValue="type2")private String type;
}
class Type2 {
@DocumentType
(fieldName="type", fieldValue="type2")private String type;
}
No further details from DATASOLR-350
The text was updated successfully, but these errors were encountered: