I worked with some Sitecore 7 search code. Example below.
using (var context = Index.CreateSearchContext()) {
This works fine in SOLR, but when used with standard Lucene, when I refer to the property in SearchResults<SearchResultItem> returned by GetResults() , Sitecore errors with " Cannot access a disposed object ". It seems that GetResults() not enumerating and is still hanging in searchcontext.
Does anyone come across this before and know how to fix it? I have seen some articles suggesting that SearchContext in the state of the application, but ideally I want to avoid this.
thanks
Yang
search lucene sitecore
Ian graham
source share