title: ContentSearchManager does not return any Results
body: <p>Sitecore 8 ContentSearchManager does not return any result. Below is my code:</p>
  
  <pre><code>    public IQueryable&lt;SearchResultItem&gt; PerformSearch()
      {
          var index = ContentSearchManager.GetIndex("sitecore_web_index");
          using (var searchContext = index.CreateSearchContext())
          {
              var locations = searchContext.GetQueryable&lt;SearchResultItem&gt;()
              .Where(i =&gt; i.Path.StartsWith("/sitecore/content/GlobalReferences/Locations"));
  
  
              var item = locations.ToList();
  
  
              return locations;
          }
      }
  </code></pre>
  
  <p>Code Snapshot:</p>
  
  <p><a href="https://i.stack.imgur.com/GFC1w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GFC1w.png" alt="enter image description here"></a></p>
  
  <p>Sitecore Tree: </p>
  
  <p><a href="https://i.stack.imgur.com/5M3wU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5M3wU.png" alt="enter image description here"></a></p>
  
  <p>Is there anything that I need to do to make it work? Like setting up anything in config or something?</p>
  
  <p>What I have tried so far:</p>
  
  <ul>
  <li>Rebuild Index [No Results]</li>
  </ul>
  
  <p>Note:</p>
  
  <p>I am using lucene.</p>
  
  <p><strong>UPDATES:</strong></p>
  
  <p>When I switch to master the records retrieves.</p>
  
  <pre><code>var index = ContentSearchManager.GetIndex("sitecore_master_index");
  </code></pre>
  
  <p><strong>UPDATES 2 (09/08/2015)</strong></p>
  
  <p>Looks like I have a problem when performing indexing in web.</p>
  
  <pre><code>Job started: Index_Update_IndexName=sitecore_web_index|#Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&gt; Lucene.Net.Index.CorruptIndexException: checksum mismatch in segments file
     at Lucene.Net.Index.SegmentInfos.Read(Directory directory, String segmentFileName)
     at Lucene.Net.Index.IndexFileDeleter..ctor(Directory directory, IndexDeletionPolicy policy, SegmentInfos segmentInfos, StreamWriter infoStream, DocumentsWriter docWriter, HashSet`1 synced)
     at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit)
     at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, MaxFieldLength mfl)
     at Sitecore.ContentSearch.LuceneProvider.Sharding.LuceneShard.Reset()
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.DoReset(IProviderUpdateContext context)
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.PerformRebuild(IndexingOptions indexingOptions, CancellationToken cancellationToken)
     at Sitecore.ContentSearch.LuceneProvider.LuceneIndex.Rebuild()
     --- End of inner exception stack trace ---
     at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
     at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
     at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
     at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
     at (Object , Object[] )
     at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
     at Sitecore.Jobs.Job.ThreadEntry(Object state)
  </code></pre>
  
  <p>Any ideas how to fix? What I have tried so far are:</p>
  
  <ul>
  <li>Rebuild Index </li>
  <li>Rebuild Tree </li>
  <li>Rebuild All</li>
  </ul>
  
  <p>But nothing seems to work.</p>
  
  <p>Is there a way to clean up the indexing of web so I could index from start?</p>
  
  <p><strong>SOLUTION:</strong></p>
  
  <p>Since the index is corrupted. I deleted the files and folders inside the \Data\indexes. Then after rebuild everything seems to work properly.</p>
  
  <p>I also found <a href="https://www.cognifide.com/blogs/sitecore/troubleshooting-sitecore-lucene-search-and-indexing/#.Ve1Z4BGeDGc" rel="nofollow noreferrer">this</a>. It helps also.</p>