Results 1 to 3 of 3
Thread: Searching in Lucene with Java
- 09-27-2012, 05:09 PM #1
Member
- Join Date
- Sep 2012
- Posts
- 1
- Rep Power
- 0
Searching in Lucene with Java
Hi,
I'm new to Lucene 3.6.1 and Java general. I'm trying to put together a basic app to search pdf files, and am going through a example
I found on Google:
[URL="http://www.ehow.com/how_7607733_index-search-pdf-java-lucene.html"]
I've added: lucene-core-3.6.1.jar to the build path.
My initial attempt is fairly simple:
Java Code:import org.apache.lucene.analysis.standard.StandardAnalyzer; import org.apache.lucene.index.IndexWriter; public class PDF { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub IndexWriter myWriter = new IndexWriter("index", new StandardAnalyzer(), true); } }
The problem I'm facing, is I'm getting: The constructor IndexWriter(String, StandardAnalyzer, boolean) is undefined
Very confused at this point, any help you could offer would be appreciated.
- 09-27-2012, 06:35 PM #2
Re: Searching in Lucene with Java
If this is the API for the class used, I don't see a constructor that accepts those parameters.
https://lucene.apache.org/core/3_6_1...dexWriter.html
Maybe you need to go through this tutorial Lesson: Classes and Objects (The Java™ Tutorials > Learning the Java Language)
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 09-27-2012, 06:41 PM #3
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
Re: Searching in Lucene with Java
The first place to start should be the API: does that constructor exist in the API?
IndexWriter (Lucene 3.6.1 API)
The tutorial in the link you gave to ehow is quite poor that it is quite plausibly using old versions (2 or below) of Lucene and does not state what version it is using (and is most likely using a very old version).
Similar Threads
-
help searching withing a site java
By tamir146 in forum New To JavaReplies: 3Last Post: 09-09-2012, 01:56 PM -
Searching for keywords only instead of full-text search with Lucene
By DetRRG in forum LuceneReplies: 0Last Post: 02-25-2011, 08:13 AM -
java searching from many files
By manish250 in forum Advanced JavaReplies: 0Last Post: 12-31-2010, 07:50 AM -
OOM error while searching in lucene
By formadhukar in forum LuceneReplies: 2Last Post: 03-30-2010, 05:39 AM -
Lucene indexing ans searching code needed
By vgarg80 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 06-07-2008, 11:31 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks