Skip to content

Commit

Permalink
Added place_rank constant for PostCodes - 20, same as suburb from OSM
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMikita committed Sep 5, 2017
1 parent 976f3d7 commit f8cb3d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conf/sphinx/sphinx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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 --------------- */
Expand All @@ -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
Expand Down

0 comments on commit f8cb3d5

Please sign in to comment.