c# - Lucene : very slow NRT performance -


I am testing the performance of NRT (near real time) in my application and I really get strange results. . I am using this question as a sample for all questions (the test set is very small, so all the elements should not have an issue, 250 files are indexed, only text files, total index size = 1.5 MB,
  Public static list & lt;  

I have a load of files for a very gb index that the actual set I want is

IndexableItem GetAllElements () {var qp = New Lucene.Net.QueryParsers.QueryParser (Lucene.Net.Util.Version.LU CENE_29, "Provider Path", Analyst); Qp.AllowLeadingWildcard = True; var Query = qp.Parse ("*"); Var Finder = New Lucene.Net.Search.IndexSearcher (Reader); IndexableItem & gt ; Docs = new list & index = gt; (); searcher. Search (query; new simple hecollolator (docId = & gt; {docs.ad (reader document (dOCID) .andexex ())})) ; Docs return;}

As you can see it is very simple, the runtime runs around 0.1 seconds, while indexing is not running, But if I have the indexing at the same time then it goes up. . . . 45 seconds or more!

The reader variable is a defined property such as:

  Public Steady Index Reader ({get author.GetReader})}}   

And Author:

  Static SearchIndexManager () {Author = New Index. Author (FS Directory. Open (@ "C: \ MyFolder"), Analyst, Index. Maxfield. UNLIMITED);   

The display problem is definitely within the lucon (it is within the hiccuper, takes between every dose for 1 second. Add lin E) Can not be able to fit it (it is a trivial method and is not completely dependent on anything used by the indexer (disk IO etc.).

I'm sure something It is wrong, as obviously the target NRT does not have to get the 450x recession, any advice, where should I look for an indication?

Some more information: I am not optimizing during the recession, And "in some time" when indexing There is still a quick answer, but it happens when it sounds very random. I once call in some time (every entry 100).

And there will be no change when searching. This is the optimal use of NRT, I do not mean that the search at the same time is not possible with indexing. Search or reading are sub-summaries if they are the same as indexing.

Opposition Ider method IndexReader.Reopen . The purpose is to get a fresh reader, if the index is changing or changed, because the old presentation of the IndexReader was received. So if you continue to use the old example then you can remember those documents. You can find the ones you should find, and you're reading from the 'Goal Goal', thus slowing performance

you have written:

Index remains in the file 1 And keeps growing (it ups As soon as I start a search, like a commitment was compelled,

When you IndexReader IndexWriter < / Code>, it will flush a buffer change - note it is not a commitment.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -