The core Drupal search engine strips all tags out of the node's output and then indexes all of the words. WIth most content this works fine, but with standard formatting of addresses this gets tricky as several important fields are usually not displayed, specifically the province's full name and the country code. What I suggest is adjusting the standard location.tpl.php to add these fields in a hidden div.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Needs review
FileSize
1.15 KB

Here's a patch that adds the $province_name and (uppercased) $country code to the standard template file. Note that because the default core Search module's settings exclude two-letter words many people will not see relevance from the country code, but it will be useful for some use cases.

This patch sponsored by Bluespark Labs.

DamienMcKenna’s picture

FileSize
699 bytes

Updated patch that now uses an inline style definition to hide the output rather than placing it in location.css, which is not loaded most of the time.

podarok’s picture

Version: 6.x-3.1 » 7.x-3.x-dev

all feature requests should be rolled against latest 7.x-3.x-dev and after commit can be backported to 6.x branch

Status: Needs review » Needs work

The last submitted patch, location-n896384-2.patch, failed testing.

Yurii Krysiuk’s picture

Issue summary: View changes
FileSize
1.06 KB

Update and fix patch file

Yurii Krysiuk’s picture

FileSize
678 bytes

edit patch file

Yurii Krysiuk’s picture

Yurii Krysiuk’s picture

Created new patch file

Yurii Krysiuk’s picture

Added new patch file

Yurii Krysiuk’s picture

Status: Needs work » Needs review
podarok’s picture

Status: Needs review » Fixed

thanks, commited

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jwilson3’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Closed (fixed) » Patch (to be ported)
FileSize
1.04 KB

Can this be backported to D6?

legolasbo’s picture

Status: Patch (to be ported) » Closed (outdated)

Closing old D6 issues as D6 is end of life