- Split IndexBuilder from SearchAdsDemo
- Generate Forward Index and Inverted Index
- Store Forward Index in MySQL DB, Inverted Index in Memcached.
- Create two tables in Database "Searchads":
### Table: campaign
Columns:
campaignId int(11) PK
budget double
### Table: ad
Columns:
adId int(11) PK
campaignId int(11)
keyWords varchar(1024)
bidPrice double
price double
thumbnail mediumtext
description mediumtext
brand varchar(1024)
detail_url mediumtext
category varchar(1024)
title varchar(2048)
- Change
adsDataFilePath,
budgetDataFilePath,
memcachedServer,
mysqlHost,
mysqlDb,
mysqlUser,
mysqlPass
to your own value
-
Start Memcached: In terminal, type in /usr/local/bin/memcached -d -p 11211
-
Run Main.java file in project
Data too long for column 'brand' at row 1.
Change brand varchar(100)
into brand varchar(1024)