Re: lucene and ejb applications

2013-08-09 Thread Stephen Howe
What kind of application are you trying to write? On Fri, Aug 9, 2013 at 6:31 AM, John C wrote: > Hi, > > can I have an advice to write an EJB app that R/W on Lucene's Indexs? > Please. > > Thank you >

Re: Lucene vs RDBMS indexing at scale

2013-02-05 Thread Stephen Howe
Part of the answer depends on what kind of records you have. For instance, are you dealing with a lot of numeric data? If you need all those functions and only want to support exact matches and basic boolean comparisons, then I'd go with a RDBMS instead of Lucene. You'll get better support for the

Re: Lucene Index backward compatibility related question

2012-08-27 Thread Stephen Howe
Paul, So long as you are not writing to the 3.x index, it appears Lucene 4.0 can read the indexes in a read only format. See Mike McCandle's blog post http://blog.mikemccandless.com/2012/07/lucene-400-alpha-at-long-last.html about the alpha release codecs. As to whether or not that codec allows yo

Re: Lucene join

2012-08-27 Thread Stephen Howe
Trupti, Looking over your sample query, that looks like you're trying to do a SQL query against a database instead of a Lucene query. If you're going against a SQL database, Lucene isn't a good tool for the problem you've outlined. If you're using SQL, you can do multiple joins to link multiple ta

Re: RAM or SSD...

2012-07-18 Thread Stephen Howe
What metrics are you measuring performance by? Also, what is your current setup? You might be able to speed up your current setup by tweaking configuration settings without needing more hardware. On Wed, Jul 18, 2012 at 11:50 AM, Dragon Fly wrote: > > Hi, > > If I want to improve performance, whi

Re: MemoryIndex "field must not be added more than once"

2012-03-07 Thread Stephen Howe
Easiest way to do that would be to append all your values together and then add them in one pass. Unfortunately, you can only add a field + values once. -Stephen On Wed, Mar 7, 2012 at 9:39 AM, Dave Seltzer wrote: > I'm using a MemoryIndex to search in-memory content. > > I was wondering if the

Re: Higher Latency at the start of application

2012-02-17 Thread Stephen Howe
If you have enough RAM, have you looked into using a MMap directory instead of the FSDirectory? That will push your index up into RAM instead of having to keep hitting the disk to look stuff up. Also, have you thought about running some precanned queries, prior to exposing the app to the user, to

Lucene 3.5 Payloads

2012-01-31 Thread Stephen Howe
Working with Lucene 3.5, I'd like to append a payload to a specific field in the index, at indexing time. To get that, I use the following code to produce a token stream with the Standard Analyzer for the field I want to place the payload on. public static TokenStream tokenStream(final String fiel

Re: Searching a string using lucene

2012-01-31 Thread Stephen Howe
Have you taken a look at the MemoryIndex? http://lucene.apache.org/java/3_5_0/api/all/index.html 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 a

Re: Lucene 4 getSpans not retrieving spans

2012-01-25 Thread Stephen Howe
Thanks for the reply, wrapping with the SlowMultiReaderWrapper worked. Also, thanks for the overview on the direction of index readers! On Wed, Jan 25, 2012 at 5:21 PM, Uwe Schindler wrote: > Hi, > > > Goofing off with my index, I ran across this example > > > http://www.lucidimagination.com/blo

Lucene 4 getSpans not retrieving spans

2012-01-24 Thread Stephen Howe
Goofing off with my index, I ran across this example http://www.lucidimagination.com/blog/2009/05/26/accessing-words-around-a-positional-match-in-lucene/ for using span queries to see what else is around a word that hits. Noticeably, there's a nice getSpans(IndexReader) method that just takes in th

Re: Lucene 4.0 Get All Index Terms

2012-01-24 Thread Stephen Howe
/blog.mikemccandless.com > > On Tue, Jan 24, 2012 at 4:10 PM, Stephen Howe > wrote: > > Hi all, > > > > Looking at some older Lucene examples, I noticed for older versions of > > lucene that IndexReader came with a handy terms() method that would > return > > a

Lucene 4.0 Get All Index Terms

2012-01-24 Thread Stephen Howe
Hi all, Looking at some older Lucene examples, I noticed for older versions of lucene that IndexReader came with a handy terms() method that would return a listing of all the terms in the index and let you get at the term frequency. In Lucene 4.0, I noticed this method vanished from IndexReader. I

Lucene 4.0 MemoryIndex Bug?

2011-12-08 Thread Stephen Howe
I've been playing around with Lucene's MemoryIndex and anytime I try to use index.addField(String, String, Analyzer), I receive: java.lang.NoSuchMethodError: org.apache.lucene.util.BytesRef.deepCopyOf(Lorg/apache/lucene/util/BytesRef;)Lorg/apache/lucene/util/BytesRef; anytime I make a call to it. I