1

I would like to allow users to search node location using location city with synonyms.

For example:

  • New York
  • NY
  • NYC
  • New York City

etc.

should bring the same search results.

How to do this ?

0

I have created the related feature request here.

If this feature is not yet available in the location module, I could maybe use Views, create the indexed synonyms as taxonomy terms vocabulary and term reference field Content: Location Synonyms, modify the view's Global: combine filters filter setting Choose fields to combine for filtering as Location: City and Content: Location Synonyms? This would require tagging each node location synonyms manually or would require setting up a Rule (using Rules contrib module) that would add these synonyms automatically depending on the Location: City selected. The standard Drupal search would index these tags.

It would be better to have it either inside the Location module or as an additional contributed helper module.

There is also a contributed module Location Taxonomize that might help in achieving this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.