We have a few scenarios on a project where we want results to be presented at the top of the of the page despite not having any keywords in the body copy related to the search keyword.

For instance, if someone on our site searches for "baseball," we'd like a few choice results about "football" to come up, even though the nodes are strictly about baseball.

Are there any modules that allow for this behavior in the search functionality of Drupal?

  • For which Drupal version are you asking? – kiamlaluno Apr 17 '11 at 12:04
  • Drupal 6 is the version where I'm currently using for this particular project. – Randy Burgess Apr 17 '11 at 16:25

If you are using ApacheSolr then I imagine this could be solved with the use of 'Synonyms'.

See the documentation on this.

Example synonyms file you might use:

#Equivalent synonyms may be separated with commas and give
#no explicit mapping.  In this case the mapping behavior will
#be taken from the expand parameter in the schema.  This allows
#the same synonym file to be used in different synonym handling strategies.
ipod, i-pod, i pod
baseball, football

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.