2
顯然,數據庫中的更改不會反映索引中的內容。是否有人在Lucene上使用EF,並將Lucene搜索的結果與EF中的相同搜索結果相結合?我知道你只想從EF中取回不在Lucene結果中的結果。將Lucene結果與實體框架結果相結合?
更新:
我想處理這將是先搜索Lucene索引,並得到一個結果列表的最佳方式,那麼你會做這樣的搜索EF:
僞代碼:
var result = (from ef in EntityFrameworkList
where !(from l in LuceneList
select l.documentId)
.Contains(ef.Id)
select ef);
LuceneList.AddRange(result);
對於那些誰喜歡法鏈
var result = (EntityFrameworkList.Where(ef => !(LuceneList.Select(l => l.documentId))
.Contains(ef.Id)));