Mailing List Archive

compiling example code
I am attempting to build the example code which is located in the

\lucene-1.2-rc2\src\demo\org\apache\lucene

directory in the distribution. Specifically, I'm trying to get
IndexFiles.java, SearchFiles.java, and FileDocument.java to compile, as a
sanity check, before trying to go any further. (The project is to develop
an extension to the vector model using fuzzy clustering; details available
if anyone wants them.)

Two of these files compile without error. However, when I attempt to
compile IndexFiles.java, I get the following error:

C:\lucene-1.2-rc2\src\demo\org\apache\lucene\IndexFiles.java:95: cannot
resolve symbol
symbol : variable FileDocument
location: class org.apache.lucene.IndexFiles
writer.addDocument(FileDocument.Document(file));
^
1 error


I don't understand why I'm getting this error; FileDocument has already
been compiled, and the class is in the same directory as the other
documents. Perhaps I'm just missing something basic about using packages,
but it all seems plausible.

Has anyone managed to get these examples to build, and if so, how?

Thanks--

Joshua

jmadden@ics.uci.edu...Obscurium Per Obscurius...www.ics.uci.edu/~jmadden
Joshua Madden: Information Scientist, Musician, Philosopher-At-Tall
It's that moment of dawning comprehension that I live for--Bill Watterson
My opinions are too rational and insightful to be those of any organization.


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: compiling example code [ In reply to ]
Are you using ant? By just using "ant demo" from the lucene root directory
everything goes fine. Make sure you have the latest ant (1.4).

And also, I would be very interested in seeing what you are doing. At my
previous job, we started building a clusterizer around lucene but turned out
to be a little bit slow, so, we ended up building our own similarity
measuring (manhattan distance between word vectors).

Alex

-----Original Message-----
From: Joshua O'Madadhain [mailto:jmadden@ics.uci.edu]
Sent: Tuesday, November 13, 2001 7:14 PM
To: lucene-user@jakarta.apache.org
Subject: compiling example code


I am attempting to build the example code which is located in the

\lucene-1.2-rc2\src\demo\org\apache\lucene

directory in the distribution. Specifically, I'm trying to get
IndexFiles.java, SearchFiles.java, and FileDocument.java to compile, as a
sanity check, before trying to go any further. (The project is to develop
an extension to the vector model using fuzzy clustering; details available
if anyone wants them.)

Two of these files compile without error. However, when I attempt to
compile IndexFiles.java, I get the following error:

C:\lucene-1.2-rc2\src\demo\org\apache\lucene\IndexFiles.java:95: cannot
resolve symbol
symbol : variable FileDocument
location: class org.apache.lucene.IndexFiles
writer.addDocument(FileDocument.Document(file));
^
1 error


I don't understand why I'm getting this error; FileDocument has already
been compiled, and the class is in the same directory as the other
documents. Perhaps I'm just missing something basic about using packages,
but it all seems plausible.

Has anyone managed to get these examples to build, and if so, how?

Thanks--

Joshua

jmadden@ics.uci.edu...Obscurium Per Obscurius...www.ics.uci.edu/~jmadden
Joshua Madden: Information Scientist, Musician, Philosopher-At-Tall
It's that moment of dawning comprehension that I live for--Bill Watterson
My opinions are too rational and insightful to be those of any organization.


--
To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: compiling example code [ In reply to ]
On Tue, 13 Nov 2001, Alex Murzaku wrote:

> Are you using ant? By just using "ant demo" from the lucene root
> directory everything goes fine. Make sure you have the latest ant
> (1.4).

I have no idea what ant is or what it's supposed to be for; I'll do a web
search to see if I can get one (an idea, that is), but a brief explanation
would be appreciated. However, I would hope that it shouldn't be
necessary to use a separate tool (aside from javac, that is) in order to
just build some fairly basic sample code.

> And also, I would be very interested in seeing what you are doing. At
> my previous job, we started building a clusterizer around lucene but
> turned out to be a little bit slow, so, we ended up building our own
> similarity measuring (manhattan distance between word vectors).

The basic idea is that I'm investigating a technique that combines fuzzy
term expansion and fuzzy reranking of query results: the term expansion
should help improve recall, and the reranking should help to improve
precision. You do this by creating a weighted graph that represents word
similarities in some fashion and adding to the query those terms that are
sufficiently close to the query terms (using your favorite definitions of
"sufficient" and "close"). On the back end, you include in the ranking
of each document a factor that takes account of just how fuzzy a match the
terms in the document are for the query terms.

How fast this will be, especially for this prototype, I don't know; right
now I'm more interested in its effect on recall and precision than
anything else. It does require some additional overhead up front (when
the index is created) but shouldn't require too much extra work on a
query-by-query basis. We shall see. :)

Joshua

jmadden@ics.uci.edu...Obscurium Per Obscurius...www.ics.uci.edu/~jmadden
Joshua Madden: Information Scientist, Musician, Philosopher-At-Tall
It's that moment of dawning comprehension that I live for--Bill Watterson
My opinions are too rational and insightful to be those of any organization.

> Two of these files compile without error. However, when I attempt to
> compile IndexFiles.java, I get the following error:
>
> C:\lucene-1.2-rc2\src\demo\org\apache\lucene\IndexFiles.java:95: cannot
> resolve symbol
> symbol : variable FileDocument
> location: class org.apache.lucene.IndexFiles
> writer.addDocument(FileDocument.Document(file));
> ^
> 1 error
>
>
> I don't understand why I'm getting this error; FileDocument has already
> been compiled, and the class is in the same directory as the other
> documents. Perhaps I'm just missing something basic about using packages,
> but it all seems plausible.
>
> Has anyone managed to get these examples to build, and if so, how?


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: compiling example code [ In reply to ]
> On Tue, 13 Nov 2001, Alex Murzaku wrote:
> > Are you using ant? By just using "ant demo" from the lucene root
> > directory everything goes fine. Make sure you have the latest ant
> > (1.4).
>
> I have no idea what ant is or what it's supposed to be for; I'll do a web
> search to see if I can get one (an idea, that is), but a brief explanation
> would be appreciated. However, I would hope that it shouldn't be
> necessary to use a separate tool (aside from javac, that is) in order to
> just build some fairly basic sample code.

Try reading http://www.darksleep.com/puff/lucene/lucenereadmedraft.txt

You may also find http://www.darksleep.com/puff/lucene/lucene.html
useful. Please let me know if you have any problems at all with either
document, and I'll try to clarify them (and factor that clarification
back into the document).

Steven J. Owens
puff@darksleep.com

--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
Re: compiling example code [ In reply to ]
[.I'm taking the liberty of redirecting part of a conversation on Lucene
that I took off-list back on-list, since I think it's become generally
relevant.]

On Fri, 16 Nov 2001, Steven J. Owens wrote:

> > ...I still think it's easier for a project
> > consisting of three files to just compile the durned thing rather than
> > creating an XML file so that I can run ant on it...and probably easier on
> > users to not have them have to acquire, set up, and use an extra tool for
> > such purposes. <shrug> Ah well.
>
> Uhm, 3 files? Lucene contains considerably more :-). For a
> project consisting of three files you can just always compile all of
> the files or use javac's built-in dependency checking. The readme is
> aimed at people building lucene from source. People using the binary
> release just grab the jar and stick it in their classpath.

What I was trying to build was not the whole thing, but the supplied demo
without the HTML stuff: FileDocument.java, IndexFiles.java, and
SearchFiles.java. When I tried to compile these three files using javac
(with the classpath properly set to include the Lucene stuff), I got the
error I reported earlier (IndexFiles was unable to find FileDocument).
Once I removed them from the package org.apache.lucene (by removing the
package declaration at the top), I was able to compile them without a
hitch. Since those three files are not actually part of Lucene itself,
but just part of the demo, I think that having them in the
org.apache.lucene package in the first place is more confusing than
helpful.

Yes, this would necessitate two sets of instructions: one for building the
source, and one for building the demo. I don't see this as a problem,
personally.

Joshua

jmadden@ics.uci.edu...Obscurium Per Obscurius...www.ics.uci.edu/~jmadden
Joshua Madden: Information Scientist, Musician, Philosopher-At-Tall
It's that moment of dawning comprehension that I live for--Bill Watterson
My opinions are too rational and insightful to be those of any organization.




--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>