lucene-lucene-net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Aroush" <geo...@aroush.net>
Subject RE: A little confused about how to use IndexSearcher in a web environment
Date Mon, 06 Nov 2006 02:29:43 GMT
Hi Kurt,

Yes, you got it right.  Opening/closing of the index per search is an
expansive thing to do.  I am not as experience with ASP.NET as others maybe
here, but if by placing the IndexSearcher in Global.asax will give you a
single, open instance of IndexSearcher, then yes this will work.  To handle
index updating, can you have another application which sends a http request
to your ASP.NET application signaling it to close and re-open the
IndexSearcher?  If not, then you will need a way to re-init the
IndexSearcher when the index changes.

Regards,

-- George Aroush

-----Original Message-----
From: Kurt Mackey [mailto:kurt@mubble.net] 
Sent: Sunday, November 05, 2006 6:56 PM
To: lucene-net-user@incubator.apache.org
Subject: A little confused about how to use IndexSearcher in a web
environment

So I have an ASP.NET app which makes use of Lucene.net for a number of
things, and I'm not quite sure what the "correct" way to use the
IndexSearcher is.  At first, I was treating it like I would database
connections (ie: opening and closing a new one each time I needed to do
something), but given that there's no Lucene.net threadpool that doesn't
seem like the best way to do it.

Should I have a single IndexSearcher that's setup in my Global.asax file,
and then use that on any page that needs to search the index instead?  I'd
need to close and reopen it when the index is updated, wouldn't I?

Any kind of guidance would be good, I'm not finding much written about this
sort of thing. :)

Thanks,
Kurt


Mime
View raw message