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 8980463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:05:40+00:00 2026-06-15T20:05:40+00:00

The question I am asking is specifically because I don’t want to use AzureDirectory

  • 0

The question I am asking is specifically because I don’t want to use AzureDirectory project. I am just trying something on my own.

cloudStorageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=http;AccountName=xxxx;AccountKey=xxxxx");

        blobClient=cloudStorageAccount.CreateCloudBlobClient();


        List<CloudBlobContainer> containerList = new List<CloudBlobContainer>();
        IEnumerable<CloudBlobContainer> containers = blobClient.ListContainers();
        if (containers != null)
        {
        foreach (var item in containers)
        {
            Console.WriteLine(item.Uri);
        }
        }
        /* Used to test connectivity 
        */
        //state the file location of the index

        string indexLocation = containers.Last().Name.ToString();
        Lucene.Net.Store.Directory dir =
            Lucene.Net.Store.FSDirectory.Open(indexLocation);

        //create an analyzer to process the text
        Lucene.Net.Analysis.Analyzer analyzer = new
        Lucene.Net.Analysis.Standard.StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30);

        //create the index writer with the directory and analyzer defined.

        bool findexExists = Lucene.Net.Index.IndexReader.IndexExists(dir);

        Lucene.Net.Index.IndexWriter indexWritr = new Lucene.Net.Index.IndexWriter(dir, analyzer,!findexExists, Lucene.Net.Index.IndexWriter.MaxFieldLength.UNLIMITED);
        //create a document, add in a single field
        Lucene.Net.Documents.Document doc = new  Lucene.Net.Documents.Document();
        string path="D:\\try.html";
        TextReader reader = new FilterReader("D:\\try.html");
        doc.Add(new Lucene.Net.Documents.Field("url",path,Lucene.Net.Documents.Field.Store.YES,Lucene.Net.Documents.Field.Index.NOT_ANALYZED));
        doc.Add(new Lucene.Net.Documents.Field("content",reader.ReadToEnd().ToString(),Lucene.Net.Documents.Field.Store.YES,Lucene.Net.Documents.Field.Index.ANALYZED));
        indexWritr.AddDocument(doc);
        indexWritr.Optimize();
        indexWritr.Commit();
        indexWritr.Close();

Now the issue is after indexing is completed I am not able to see any files created inside the container. Can anybody help me out?

  • 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-15T20:05:42+00:00Added an answer on June 15, 2026 at 8:05 pm

    You’re using the FSDirectory there, which is going to write files to the local disk.

    You’re passing it a list of containers in blob storage. Blob storage is a service made available over a REST API, and is not addressable directly from the file system. Therefore the FSDirectory is not going to be able to write your index to storage.

    Your options are :

    1. Mount a VHD disk on the machine, and store the VHD in blob storage. There are some instructions on how to do this here: http://blogs.msdn.com/b/avkashchauhan/archive/2011/04/15/mount-a-page-blob-vhd-in-any-windows-azure-vm-outside-any-web-worker-or-vm-role.aspx
    2. Use the Azure Directory, which you refer to in your question. I have rebuilt the AzureDirectory against the latest storage SDK: https://github.com/richorama/AzureDirectory
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before asking a question, and before you all get mad because there are a
I am asking this question here because it is my understanding that this is
I dread asking this question, because with what I've read so far I understand
Similar to this question asking about relatively light-weight data entry / editor application development,
So I wrote this simple console app to aid in my question asking. What
I read a question earlier asking if there was a times method in Python,
There was a similar question posted asking in general about alternatives to Qt. Well,
Before, I post a question here asking for advice on how to read and
Before asking the question let me preface with the fact that I am new
Before asking my question, let me explain the context. CONTEXT: I have a web

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.