Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Installing Lucene(Error messages in java script)
Installing Lucene [message #1746355] Thu, 27 October 2016 12:57 Go to next message
John Yamamoto-Wilson is currently offline John Yamamoto-WilsonFriend
Messages: 2
Registered: October 2016
Junior Member
Hi. I'd like to be able to post a few links, to help explain my query, but I'm being told I can only use links to eclipse.org sites...

Basically, I'm following instructions on installing Lucene from a Youtube video, and everything's going fine until I try to paste the Indexfiles.java code and Searchfiles.java code in order to test whether Lucene is working correctly together with Eclipse. At this stage large numbers of syntax errors show up, right from the very first line (001/*).

I've deleted everything and repeated the procedure several times, but the result is always the same - syntax errors.

Thanks in advance for any help anyone here can offer!
Re: Installing Lucene [message #1746377 is a reply to message #1746355] Thu, 27 October 2016 18:37 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 496
Registered: August 2014
Senior Member
Without seeing the source code: Did you paste line numbers together with the code?



--

Tauno Voipio
Re: Installing Lucene [message #1746383 is a reply to message #1746377] Thu, 27 October 2016 21:14 Go to previous message
John Yamamoto-Wilson is currently offline John Yamamoto-WilsonFriend
Messages: 2
Registered: October 2016
Junior Member
Thank you! As you can see, I am not a programmer. I found http://remove-line-numbers.ruurtjan.com/ and removed the line numbers there before pasting.

Overall, it's looking much healthier now, except for line 17:

017package org.apache.lucene.demo;

The error message I'm getting on that line is that the package does not match the expected package lucene. I ran it anyway, but it didn't like it, so I changed line 17 to:

package lucene;

This led to red ink in the console saying:

Usage: java org.apache.lucene.demo.IndexFiles [-index INDEX_PATH] [-docs DOCS_PATH] [-update]

This indexes the documents in DOCS_PATH, creating a Lucene indexin INDEX_PATH that can be searched with SearchFiles

Running SearchFiles led to more red ink:

Exception in thread "main" org.apache.lucene.index.IndexNotFoundException: no segments* file found in MMapDirectory@/Users/jyamamo/Documents/workspace/LuceneDemo/index lockFactory=org.apache.lucene.store.NativeFSLockFactory@531d72ca: files: []
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:680)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:77)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63)
at lucene.SearchFiles.main(SearchFiles.java:90)

Thanks to your help I'm getting closer, but I'm not quite there yet!
Previous Topic:Problems Moving Project from NetBeans to Eclipse
Next Topic:Maven Jetty Plugin 9.2.6.v20141205 run-forked goal not working with our webapp
Goto Forum:
  


Current Time: Sat Sep 21 00:56:54 GMT 2019

Powered by FUDForum. Page generated in 0.03546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top