lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Seltzer <>
Subject RE: Searching a string using lucene
Date Tue, 31 Jan 2012 22:05:36 GMT
Hi Stephen,

That is precisely what I was looking for! Thanks very much!


-----Original Message-----
From: Stephen Howe [mailto:]
Sent: Tuesday, January 31, 2012 11:00 AM
Subject: Re: Searching a string using lucene

Have you taken a look at the MemoryIndex? See in particular:

> Typically, it is about 10-100 times faster than RAMDirectory. Note that
> RAMDirectory has particularly large efficiency overheads for small to
> medium sized texts, both in time and space. Indexing a field with N
> takes O(N) in the best case, and O(N logN) in the worst case. Memory
> consumption is probably larger than for RAMDirectory.
> Example throughput of many simple term queries over a single
> ~500000 queries/sec on a MacBook Pro, jdk 1.5.0_06, server VM. As
> your mileage may vary.

If you have all your queries predefined, this could be a pretty fast way
get where you want to go.

On Tue, Jan 31, 2012 at 10:50 AM, Dave Seltzer <>

> Hello,
> I'm having a bit of trouble Googling this, so I'm hoping someone can
> me in the right direction.
> We have a system which generates blocks of text which need to be
> as they come in. I was hoping I could use Lucene's query parser and
> analyzer to search a block of text for a series of searches. This
example (
> )
> similar to what I want to do, only I'm only interested in searching one
> document at a time.
> Is my best bet to create an in-memory index, search it, and then throw
> away? Is this fast enough to do a hundred times a second?
> Or am I better off using the Highlighter to find out if the document
> contains a hit?
> Or is there a third, more-awesome, way of doing this?
> Thanks much!
> -Dave

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message