Re: Searching through a single XML document

2008-04-20 Thread Ulf Dittmer
The search can't return more than one document, because only a single document is ever added to the index. You might want to think about structuring the index differently, e.g. by creating one Document for each SPEECH element. The search for "the" in particular won't find anything, because that's

Re: Highlighting phrases

2008-04-20 Thread Mark Miller
https://issues.apache.org/jira/browse/LUCENE-794 Because its for a customer, that will be 1 beer... On Sun, 2008-04-20 at 17:12 -0600, Scott Smith wrote: > I've written some code to highlight items from a search using the standard > Highlighter class, QueryScorer, and NullFragmenter. Everything

Highlighting phrases

2008-04-20 Thread Scott Smith
I've written some code to highlight items from a search using the standard Highlighter class, QueryScorer, and NullFragmenter. Everything works fine except when we do phrases. If I search for "fred smith" (with the quotes), it highlights any instances of "fred smith" just as expected. However

Searching through a single XML document

2008-04-20 Thread syedfa
Dear Fellow Java/Lucene developers: I am trying to write a search engine application for shakespeare's "Hamlet" which I have in xml format. For demonstration purposes, I am using an xml file of some quotes from the play only, which is listed below: The Tragedy of Hamlet, Prince of Denmark LOR

Re: Occasional Hang in IndexWriter.close()

2008-04-20 Thread Stu Hood
Hey Mike, Thanks for your input... the 'IndexWriter.close' call was actually in a 'finally' block around the merge code, without a 'catch', which I realized may have been hiding the exception (I didn't realize close would block if an exception had occurred). I've moved the close out of the fin

RE: How to Retrieve Found Term?

2008-04-20 Thread Edwin Lee
Hi Karl, Thanks for the response. i have looked at the Highlighter. Unfortunately, when i feed it with a PhraseQuery, it seems to break up the query into it's individual terms first, so does not yield the result that i would like. i have not looked at Searcher.explain yert though. It's like t

Re: A question about ParalellMultiSearcher and RMI

2008-04-20 Thread 游泳池的鱼
In 32bit operate system JVM not support memory biger than 2g 2008/4/20, Chris <[EMAIL PROTECTED]>: > > You may try to use the java parameter with -xmx to set up your memory. > If you have 8G Ram in system , but java VM only caluse the smaller usage. > > And I try to merage the index from disk to

IndexSearcher.close() doesn't close Directory

2008-04-20 Thread Timo Nentwig
Hi! I advised Directory.close() (AspectJ) and noticed that it's not called at all for the following code: final FSDirectory d = FSDirectory.getDirectory( path ); final IndexReader r = IndexReader.open( d ); final IndexSearcher s = new IndexSearcher( r ); ... s.close(); r.close(); d.close(); // D