1

We have a website using SOLR search and we've run across an issue. For example, we have a page called "Organizational Chart" but if someone searches for "org chart" it will not appear in search results.

Is there a way to add aliases or metadata to nodes so that we can add "might be searched by" data or extra information that may enhance search visibility?

Would simply adding a cck field accomplish something like this? Taxonomy doesn't really apply because these are not categories and would be different across each node.

1
  • Try to add metatags to nodes and then add them in the solr index "fields"
    – Pedro
    Commented Sep 20, 2023 at 19:32

2 Answers 2

1

Apache Solr supports synonyms, and you can add them to the solr/conf/synonyms.txt file. The path is relative to where you copied the "example" directory to. This way people searching for "org chart" would find documents containing "Organization Chart" and any other synonyms you wish to add without any modifications to Drupal.

2
  • We're using the solr built into the Acquia stack - where would this synonyms.txt file be located in that file structure? (I can't find a solr/conf/ folder in there)
    – oranges13
    Commented Aug 10, 2011 at 19:55
  • 1
    Does this mean you are using Acquia's hosted Solr solution (Acquia Search)? If so, post a ticket with support along with the contents of the file and they can make the change for you. If you don;t know how to structure the synonyms.txt file, they can help you with that as well. Commented Aug 11, 2011 at 4:03
0

If it's a one-time problem, could you give it a path alias of "org-chart" and have Solr Search include the path in its search fields? I just tried exactly that and my test "Organization Chart" page popped to the top of the results for "org chart."

1
  • This is a very creative solution, but I definitely wouldn't recommend using path aliases when Apache Solr supports synonyms natively. Also, this technique will not work when the search keys are in a query string variable and not in the path, which the Apache Solr Search Integration module supports. Commented Jul 30, 2011 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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