Menu

#16 WikipediaDatabase won't load data into new database

open
nobody
None
5
2011-07-27
2011-07-27
Ken Weiner
No

The readme says to use WikipediaDatabase.loadData() to initialize the database for the first time. This did not work for me because the code in the WikipediaDatabase constructor checks for the existence of all the tables and fails before the loadData() method gets a chance to execute.

I had to copy all the CREATE TABLE statements from the Java source code and run them manually before I was able to use WikipediaDatabase.loadData(). This is really confusing for a new user.

For reference, the code I wrote to load data looks like this:

WikipediaDatabase wdb = new WikipediaDatabase("localhost:3306", "wikipedia", "maui", "maui");
wdb.loadData(new File("/home/ken/data/en_20080727"), true);

Am I not using the class correctly?

Discussion


Log in to post a comment.