lucenenet-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Lybecker <and...@lybecker.com>
Subject Re: Writing to an Online Index
Date Fri, 20 Apr 2012 13:01:36 GMT
Hi Gustavo,

There is no problem reading and writing to the index at the same time –
Lucene handles it for you. Just make sure that you only use one IndexWriter
at the time.


The IndexSearcher reads a snapshot of the index (based on segments), so you
need to reopen the index (IndexReader.ReOpen) to make the new document
visible to the IndexSearcher.

Regards,
Anders Lybecker

On Fri, Apr 20, 2012 at 2:54 PM, Gustavo Poll <gkpoll@gmail.com> wrote:

> Greetings friends! I need help from you, Lucene.net experts, please!
>
> First, sorry for the bad english...
>
> In the next month, my team and I will publish on the Internet our search
> site, that uses Lucene.net to search over our internal documents. If you
> wanna take a look, here it is the link to the under development site (there
> might be bugs and the web server is slow):
>
> http://satdesen.sef.sc.gov.br/tax.NET/Sat.Pesef.Web/Publicacao/Pesquisar.aspx#top
>
> The documents indexed are a sort of daily journal. So, on a daily basis, a
> new document will be indexed. And my question to you experts is about this
> index update! New documents will be writen using IndexWriter while the
> index is been used by the site users, via IndexSearch. What kind of
> problem, if any, I'll face in this scenario? May the IndexWriter fail
> because a search is been done simultaneously? How Lucene handles this
> concurrent access (writing and searching)?
>
> PS: in the search code, a new IndexSearch instance is created at every
> search (may I continue like this or it is kind of mandatory a singleton
> IndexSearch?)
>
>
> Thanx you all by the attention!
> Any doubts about my explanation, please tell me...
>
> Gustavo Poll
> Software Developer
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message