From f8cb3d5b0a4c6a4e4e044daef371e1d7fbc02d5f Mon Sep 17 00:00:00 2001 From: MartinMikita Date: Tue, 5 Sep 2017 17:37:08 +0200 Subject: [PATCH] Added place_rank constant for PostCodes - 20, same as suburb from OSM --- conf/sphinx/sphinx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/sphinx/sphinx.conf b/conf/sphinx/sphinx.conf index d84b437..2b5be2b 100644 --- a/conf/sphinx/sphinx.conf +++ b/conf/sphinx/sphinx.conf @@ -324,7 +324,7 @@ if isfile('/data/input/postcodes-uk.csv'): source src_tsv_postcodes_uk { type = tsvpipe - tsvpipe_command = %(catcmd)s | sed -e 's/\\r//g' | gawk -F"," -v OFS='\\t' 'NR > 1 && NF == 4 { $5="1.0"; $6=$2 ; $7=$2; $8="postcode"; $9=$4; $10=$3; $11=$4; $12=$3; NF = 12; for (i=1; i<=NF; i++) printf("%%s%%s", $i, (i!=NF)?OFS:ORS) }' + tsvpipe_command = %(catcmd)s | sed -e 's/\\r//g' | gawk -F"," -v OFS='\\t' 'NR > 1 && NF == 4 { $5="1.0"; $6=$2 ; $7=$2; $8="postcode"; $9=$4; $10=$3; $11=$4; $12=$3; $13="20.0"; NF = 13; for (i=1; i<=NF; i++) printf("%%s%%s", $i, (i!=NF)?OFS:ORS) }' } # /* --------------- ~ PostCodes UK source --------------- */ @@ -349,6 +349,7 @@ source src_postcodes_uk : src_tsv_postcodes_uk tsvpipe_attr_float = south tsvpipe_attr_float = east tsvpipe_attr_float = north + tsvpipe_attr_float = place_rank } index ind_postcodes_infix_uk : ind_main_charset