@define('CONST_Limit_Reindexing', true);
// Set to false to avoid importing extra postcodes for the US.
@define('CONST_Use_Extra_US_Postcodes', true);
+ // Set to true after importing Tiger house number data for the US.
+ // Note: The tables must already exist or queries will throw errors.
+ // After changing this setting run ./utils/setup --create-functions
+ // again.
+ @define('CONST_Use_US_Tiger_Data', false);
+ // Set to true after importing other external house number data.
+ // Note: the aux tables must already exist or queries will throw errors.
+ // After changing this setting run ./utils/setup --create-functions
+ // again.
+ @define('CONST_Use_Aux_Location_data', false);
// Proxy settings
@define('CONST_HTTP_Proxy', false);
@define('CONST_PolygonOutput_MaximumTypes', 1);
// Log settings
- @define('CONST_Log_DB', true);
+ // Set to true to log into new_query_log table.
+ // You should set up a cron job that regularly clears out this table.
+ @define('CONST_Log_DB', false);
+ // Set to a file name to enable logging to a file.
@define('CONST_Log_File', false);
- @define('CONST_Log_File_Format', 'TODO'); // Currently hard coded
- @define('CONST_Log_File_SearchLog', '');
- @define('CONST_Log_File_ReverseLog', '');
event text
);
-drop table if exists import_npi_log;
-CREATE TABLE import_npi_log (
- npiid integer,
- batchend timestamp,
- batchsize integer,
- starttime timestamp,
- endtime timestamp,
- event text
- );
-
---drop table IF EXISTS query_log;
-CREATE TABLE query_log (
- starttime timestamp,
- query text,
- ipaddress text,
- endtime timestamp,
- results integer
- );
-CREATE INDEX idx_query_log ON query_log USING BTREE (starttime);
-GRANT SELECT ON query_log TO "{www-user}" ;
-GRANT INSERT ON query_log TO "{www-user}" ;
-GRANT UPDATE ON query_log TO "{www-user}" ;
-
CREATE TABLE new_query_log (
type text,
starttime timestamp,
useragent text,
language text,
query text,
+ searchterm text,
endtime timestamp,
results integer,
format text,
GRANT SELECT ON TABLE country_name TO "{www-user}";
GRANT SELECT ON TABLE gb_postcode TO "{www-user}";
-create view vw_search_query_log as SELECT substr(query, 1, 50) AS query, starttime, endtime - starttime AS duration, substr(useragent, 1, 20) as
-useragent, language, results, ipaddress FROM new_query_log WHERE type = 'search' ORDER BY starttime DESC;
-
drop table IF EXISTS word;
CREATE TABLE word (
word_id INTEGER,
);
SELECT AddGeometryColumn('location_property', 'centroid', 4326, 'POINT', 2);
- CREATE TABLE location_property_aux () INHERITS (location_property);
- CREATE INDEX idx_location_property_aux_place_id ON location_property_aux USING BTREE (place_id);
- CREATE INDEX idx_location_property_aux_parent_place_id ON location_property_aux USING BTREE (parent_place_id);
- CREATE INDEX idx_location_property_aux_housenumber_parent_place_id ON location_property_aux USING BTREE (parent_place_id, housenumber);
- GRANT SELECT ON location_property_aux TO "{www-user}";
-
- CREATE TABLE location_property_tiger (linegeo GEOMETRY, place_id BIGINT, partition INTEGER, parent_place_id BIGINT, startnumber INTEGER, endnumber INTEGER, interpolationtype TEXT, postcode TEXT);
- GRANT SELECT ON location_property_tiger TO "{www-user}";
-
drop table IF EXISTS search_name;
CREATE TABLE search_name (
place_id BIGINT,