从 solr 获取数据时,我遇到了错误
已添加具有相同密钥的项目
public static void Solryeg()
{
ISolrOperations<SolrContent> solr = ServiceLocator.Current
.GetInstance<ISolrOperations<SolrContent>>();
var q = solr.Query(SolrQuery.All);
}
SolrContent.cs
public class SolrContent
{
[SolrUniqueKey("ContentId")]
public int ContentId { get; set; }
[SolrField("ContentName")]
public string ContentName { get; set; }
[SolrField("ContentTitle")]
public string ContentTitle { get; set; }
[SolrField("ContentIsActive")]
public bool ContentIsActive { get; set; }
[SolrField("ContentRatingEnabled")]
public bool ContentRatingEnabled { get; set; }
...