How to implement Lucene .Net search on Azure webrole

后端 未结 2 989
野的像风
野的像风 2021-01-23 16:52

I\'m using AzureDirectory and Lucene .NET 2.9.4 but I have wo problems:

  1. searcher doesn\'t seems to be so fast. I\'m indexing with these settings: indexWriter.S
相关标签:
2条回答
  • 2021-01-23 17:08

    Maybe this is the AzureDirectory that people are talking about, maybe not - I tweaked this in order to get better performance. While I won't claim that it's production-grade and rock solid, it may help you over the AzureDirectory that you are currently using.

    Hope it helps,

    0 讨论(0)
  • 2021-01-23 17:18

    I have actually used that exact version of Lucene.NET with AzureDirectory and it doesn't work well. AzureDirectory in my opinion is not written for production scale.

    If you look at the source code for AzureDirectory, it is using:

    • older version of Lucene as a base (2.3x)
    • exceptions are thrown everywhere (hard to debug/catch the right ones in production)
    • it uses the old storage API (pre 1.8 version of the SDK)

    I ended up creating my own dedicated Virtual Machine and using the .net 3.0.3 Lucene.Net library. Works like a champ in that environment, since I do not need to implement AzureDirectory.

    You should have only ONE IndexWriter that is easy to implement with a storage queue. You can have multiple IndexReaders if you want to limit them write a IndexReader pool (like a SQL connection pool). I have multiple of those run fine with no exceptions flying around like they where with AzureDirectory.

    My environment is a bit different lots of smaller indexes....not one massive one.

    0 讨论(0)
提交回复
热议问题