title: Lucene search not working
body: <p>I have a function which searches some articles in the Sitecore content items and give me the value. So far I have build up my indexes and it is showing in my IndexViewer. But the return of the function is 0. I looked up this link: <a href="http://sitecoregadgets.blogspot.com/2009/11/working-with-lucene-search-index-in_25.html" rel="nofollow noreferrer">http://sitecoregadgets.blogspot.com/2009/11/working-with-lucene-search-index-in_25.html</a> for more information. </p>
  
  <pre><code> protected IEnumerable&lt;Item&gt; ShowHomePageNews(int numOfArticles, string stringofCountries)
      {
          List&lt;Item&gt; items = new List&lt;Item&gt;();
          Sitecore.Search.Index indx = SearchManager.GetIndex("newsArticles");
          using (IndexSearchContext searchContext = indx.CreateSearchContext())
          {
              var db = Sitecore.Context.Database;
              CombinedQuery query = new CombinedQuery();
              QueryBase catQuery = new FieldQuery("countries", stringofCountries); //FieldName, FieldValue.
              SearchHits results = searchContext.Search(catQuery); //Searching the content items by fields.
              SearchResultCollection result = results.FetchResults(0, numOfArticles);
              foreach (SearchResult i in result)
              {
                  items = result
                                .Where(r =&gt; !r.Title.StartsWith("*"))
                                .Select(r =&gt; db.GetItem(new Sitecore.Data.ItemUri(r.Url).ToDataUri()))
                                .ToList();
                  //Lucene.Net.Documents.Field url = i.Document.GetField("_url");
                  //Sitecore.Data.ItemUri itemUri = new Sitecore.Data.ItemUri(url.StringValue());
                  //Sitecore.Data.Items.Item item = Sitecore.Context.Database.GetItem(itemUri.ToDataUri());
                  //items.Add(item);
              }
          }
          return items;
      }
  </code></pre>
  
  <p>Over here the result is 0. What I am doing wrond here?</p>
  
  <p>This is the snapshot of what I am seeing in my IndexViewer:</p>
  
  <p><img src="https://i.stack.imgur.com/nROUk.jpg" alt="IndexViewer"></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I am passing a "NZ" in the 'catQuery' and I am getting the result back. Because in my index viewer I am seeing the Field Name = _name, which contains NZ in it. I got this part. However, I want my every field to be indexed. I am seeing only 3 fields in my IndexViewer: _url, _group &amp; _name. </p>