Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7755717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:38:03+00:00 2026-06-01T12:38:03+00:00

I am using Lunece.net 2.0.5 version. I want to open and display all the

  • 0

I am using Lunece.net 2.0.5 version.
I want to open and display all the records in the index file in a grid (table) format in an ASP.NET web application, and also provide edit option for each cell in that grid.
But I don’t know how to read each row from Index file.

I used code below-

   private List<String> GetIndexTerms(string indexFolder)
        {
            List<String> termlist = new List<string>();
            IndexReader reader = IndexReader.Open(indexFolder, false);
            TermEnum terms = reader.Terms();
            while (terms.Next())
            {
                Term term = terms.Term();
                String termText = term.Text();
                int frequency = reader.DocFreq(term);
                termlist.Add(termText);
            }
            reader.Close();
            return termlist;
        }

but it returns list of each term and here I am unable to aggregate data by each row (record).

Let me know if there is way to read file by each row or I need to update version of Lucene that I am currently using.

Also please provide any links to Lucene.net’s better documentation websites.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:38:05+00:00Added an answer on June 1, 2026 at 12:38 pm

    You can read all the records/rows (documents in Lucene terminology) directly from the index without searching

    var reader =  IndexReader.Open(dir);
    for (int i = 0; i < reader.MaxDoc(); i++)
    {
        if (reader.IsDeleted(i)) continue;
    
        Document d =  reader.Document(i);
        var fieldValuePairs =  d.GetFields()
                                .Select(f => new { 
                                      Name = f.Name(), 
                                      Value = f.StringValue() })
                                .ToArray();
    }
    

    PS: v2.0.5 is very old. try latest & greatest Lucene.Net

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.NET MVC there are situations (such as form submission) that may require a
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using VB.NET on this one, in ASP.NET Web Forms. I have a property that
using SQL Server 2005 standard edition with SP2 I need to design a table
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
Using the HTML5 File API I can get the Binary String representation of a
using a binary search tree I need to add to a vector all int
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using emacs on Ubuntu 11.10. I want to connect to a SQL Server database
(Using MVC 2) From inside my controller action, I need to display the url:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.