Re: I am not able to run Lucene 2.4 Demo

2008-10-15 Thread Ganesh
Hello prabina, I worked fine in windows. Could you provide the details of exception and also the System.out messages printed by the application. Index folder will be created in the current directory. When you execute java org.apache.lucene.demo.IndexFiles , the list of files available in the

RE: I am not able to run Lucene 2.4 Demo

2008-10-15 Thread prabina pattanayak
hi sudarsan. it also does not work for me. no, i have tried the way you have specified, but it also does not work. it is throwing the same error message. one thing i want to share more is : i am using Windows OS. is there anything specific to be done for Windows OS.   plz, help me out from this pro

Re: Fields with the same name

2008-10-15 Thread Erick Erickson
Yes, assuming as I pointed out that your input string had whitespace between "bar1" and "bar2" in your first example... Erick On Wed, Oct 15, 2008 at 2:32 PM, Rafael Almeida <[EMAIL PROTECTED]>wrote: > On Wed, Oct 15, 2008 at 4:22 PM, Erick Erickson <[EMAIL PROTECTED]> > wrote: > > Yes, in terms

Re: Fields with the same name

2008-10-15 Thread Rafael Almeida
On Wed, Oct 15, 2008 at 4:22 PM, Erick Erickson <[EMAIL PROTECTED]> wrote: > Yes, in terms of what you probably mean, but your first > example would index one token "bar1bar2". But if you > changed your first example to (note space): they would > be entirely equivalent. > > doc.add(new Field("foo

Re: Fields with the same name

2008-10-15 Thread Erick Erickson
Yes, in terms of what you probably mean, but your first example would index one token "bar1bar2". But if you changed your first example to (note space): they would be entirely equivalent. doc.add(new Field("foo", "bar1 bar2", Field.Store

Re: Closing Index Reader

2008-10-15 Thread Michael McCandless
That is correct, as long as you incRef the reader before starting each query, and decRef the reader after finishing each query. If you call close() during this time, the reader is not actually closed until decRef is called for all previous incRefs. Be certain that once you close() a reade

Fields with the same name

2008-10-15 Thread Rafael Almeida
I didn't quite understand the Document documentation so well, the documentation says: "Adds a field to a document. Several fields may be added with the same name. In this case, if the fields are indexed, their text is treated as though appended for the purposes of search." Would doc.add(new

Re: Closing Index Reader

2008-10-15 Thread Khawaja Shams
Hello, Thank you for your ideas. While these look promising, it seems like there are many places within Lucene's codebase that are invoking the incRef and decRef methods. Upon a shallow analysis of the code, it seems like I can call close, and the doClose method does not get called until refCoun

Re: Question regarding sorting and memory consumption in lucene

2008-10-15 Thread mark harwood
Further to our discussion - see below a class that measures the added construction cost and memory savings for an optimised field value cache for a given index. The optimisation here being initial use of byte arrays, then shorts, then ints as more unique terms emerge. I imagine the majority of

RE: I am not able to run Lucene 2.4 Demo

2008-10-15 Thread Sudarsan, Sithu D.
Hi Prabina, The way your are specifying path E:\... is not correct. Use something like /prabina/lucene-2.4demo/src Hope this helps, Sincerely, Sithu Sudarsan -Original Message- From: prabina pattanayak [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2008 1:12 AM To: java-user@l

Re: Closing Index Reader

2008-10-15 Thread Michael McCandless
As of 2.4.0 they are public. Mike Ganesh wrote: incRef/decRef methods are protected. Is there any other way to use these methods without extending it? Regards Ganesh - Original Message - From: "Michael McCandless" <[EMAIL PROTECTED] > To: Sent: Wednesday, October 15, 2008 2:31

Re: Closing Index Reader

2008-10-15 Thread Ganesh
incRef/decRef methods are protected. Is there any other way to use these methods without extending it? Regards Ganesh - Original Message - From: "Michael McCandless" <[EMAIL PROTECTED]> To: Sent: Wednesday, October 15, 2008 2:31 PM Subject: Re: Closing Index Reader Ganesh wrote:

Re: querying without hits

2008-10-15 Thread Michael McCandless
If you want to keep every single hit, which is very dangerous for a large index, you should make a new collector. Here's an example (pulled from upcoming LIA revision): public class AllDocCollector extends HitCollector { List docs = new ArrayList(); public void collect(int doc, float sco

Re: Modification of positional information encoding

2008-10-15 Thread Michael McCandless
Renaud Delbru wrote: Hi Michael, Michael McCandless wrote: Also, this issue was just opened: https://issues.apache.org/jira/browse/LUCENE-1419 which would make it possible for classes in the same package (oal.index) to use their own indexing chain. With that fix, if you make your ow

Re: querying without hits

2008-10-15 Thread David Massart
Thanks guys. Just looking at the examples and I wonder if there is a means to directly get the total number of hits. Or is it always necessary to search for a few top docs, get the the total number of hits and then create a new collector to get all the results? TopDocCollector collector = new TopD

Re: I am not able to run Lucene 2.4 Demo

2008-10-15 Thread Michael McCandless
Can you post the full exception? Mike prabina pattanayak wrote: Hi All, i am a beginner to Lucene. and i am trying to use Lucene 2.4. when i have set lucene-core-2.4.0.jar & lucene-demos-2.4.0.jar in my CLASSPATH. and trying to run: java org.apache.lucene.demo.IndexFiles E:\prabina \

Re: Closing Index Reader

2008-10-15 Thread Michael McCandless
Ganesh wrote: Yes. Once the Indexreader is closed, you should not do make any calls with that object. Extend the IndexReader to add support for reference count. Close the reader once the count is zero. Actually you can just use the [expert] incRef/decRef methods on IndexReader to track i

Re: Closing Index Reader

2008-10-15 Thread Ganesh
Yes. Once the Indexreader is closed, you should not do make any calls with that object. Extend the IndexReader to add support for reference count. Close the reader once the count is zero. Regards Ganesh - Original Message - From: "Khawaja Shams" <[EMAIL PROTECTED]> To: Sent: Wednesd

Re: WELCOME to java-user@lucene.apache.org

2008-10-15 Thread Lukáš Vlček
Hi, it has been a while when I was working with Compass but as far as I remember someone reported that he was successful in indexing filesystem via JCR (Jackrabbit). Try searching in Compass forum ( http://forum.compass-project.org/index.jspa). May be this would be useful to you. Regards, Lukas

Re: WELCOME to java-user@lucene.apache.org

2008-10-15 Thread Ganesh
Lucene will not be able to directly index the files. You need to write a parser to parse the files and provide its contents. In case if a file got modifed after index, then you need to re-index its content. Regards Ganesh - Original Message - From: "Chris Gilliam" <[EMAIL PROTECTED]

Terms Matching Query

2008-10-15 Thread Paul Davis
Hopefully I'm not double posting this, but I haven't seen it show up in the archive and I got a weird rejection email from metalwaternews.com so I'll try again. I'm working on indexing JSON documents via Lucene and I've run into a bit of a snag. Currently, I'm indexing JSON documents by adding fie