chriseldredge / Lucene.Net.Linq

LINQ provider to run native queries on a Lucene.Net index
Other
151 stars 66 forks source link

Read Index #62

Closed temperory closed 10 years ago

temperory commented 10 years ago

I have 5 milion record index of one model.When I want read index it`s load all data and take 4 GB memory .You can see my code below.Is any way to optimize reading performance?

ReadOnlyLuceneDataProvider provider = new ReadOnlyLuceneDataProvider(FSDirectory.Open(Configuration.GetConfig(ConfigsKey.RequestUrlPath)), Lucene.Net.Util.Version.LUCENE_30);

 var email = provider.AsQueryable<Pcapnet.Model.RequestUrl>();
chriseldredge commented 10 years ago

How large is the index on disk? Lucene is designed to cache indexes in memory when you load from disk, though you may be able to customize this to some extent by modifying how you build your Directory.

chriseldredge commented 10 years ago

Closing. If you have additional info or questions feel free to reopen.