I just installed Apache Solr Search Integration version 7.x-1.0-beta15 on Drupal 7.10 and using Apache Solr 3.5.0. I'm indexing Web content that it is outside of my Web site using Nutch 1.4 and sending it to Apache Solr 3.5.0 outside of Drupal. I do not have the Drupal Nutch module installed. When I execute a search in Drupal, I receive the titles and the snippets (including highlighted search terms) for the external sites fine. However, the URLs underlying the titles are not pointing to the external site, but are pointing to the home page of my Drupal site. In looking at the Solr admin page, I can see that the external URLs are in the Solr index. The only thing I've been able to find online about this was a suggestion to change some code in the Drupal Nutch module. However, I don't have that module installed. Any suggestions? A piece of the rendered HTML is below.

<li class="search-result">
    <h3 class="title">
    <a href="http://server.historykat.com/drupal/">Al Grave &amp; Burial Site Records. Compare, reviews &amp; ratings.</a>
  </h3>
    <div class="search-snippet-info">
          <p class="search-snippet"> Graves , Dadeville Al Graves , Daleville Al Graves , Danville Al Graves , <strong>Daphne</strong> Al Graves , Dauphin ...</p>
          </div>
</li>
<li class="search-result">
    <h3 class="title">
    <a href="http://server.historykat.com/drupal/">Alabama Funeral Homes, funeral flowers, &amp; funeral planning</a>
  </h3>
    <div class="search-snippet-info">
          <p class="search-snippet"> Crossville (1) Cullman (5) D <strong>Daphne</strong> (3) Decatur (11) Demopolis (2) Dolomite (1) Dora (1) Dothan (17) Double ...</p>
          </div>
</li>
<li class="search-result">
    <h3 class="title">
    <a href="http://server.historykat.com/drupal/">William E Small. Features, reviews, ratings.</a>
  </h3>
    <div class="search-snippet-info">
          <p class="search-snippet"> Address 27896 County Road 27 <strong>Daphne</strong> , Al 36526 Cemetery Phone (251) 928-2101   Sponsored By   Other Small ...</p>
          </div>
</li>

Thanks.

Matthew

Comments

nick_vh’s picture

This has been done by design. If you want to show different links you should probably override the theming and use the field that you want to have as a link.

I hope that helps?

mhelm’s picture

Thanks for your reply. I'm a bit confused that this was done by design. Shouldn't the fields display the same way that they do within the Solr indexer? For example, shouldn't the url field map to the url within Drupal. The code below is what I see using the Solr admin screen. Note that the url is not server.historykat.com which is what shows up in Drupal.

Also, I'm not sure how I would use theming to use the field that I want. What I want to do is use the url field from Solr to populate the url in the results page within Drupal. I've tried searching for theming search results, but everything that I have found has to do with the look of the results not the content. Can you point me to a tutorial? Or is this something I have to modify in the apachesolr search module (I've looked at it, but is wasn't obvious how I would accomplish the objective modifying the module).


<doc>
<str name="content">
African American Cemetery News African American Cemetery News Home...[snip]
</str>
<str name="id">http://africanamericancemeteries.com/news/</str>
<str name="label">African American Cemetery News</str>
<str name="site">africanamericancemeteries.com</str>
<arr name="spell">
<str>
African American Cemetery News African American Cemetery News...[snip]
</str>
<str>African American Cemetery News</str>
</arr>
<date name="timestamp">2012-01-16T21:24:28.992Z</date>
<str name="url">http://africanamericancemeteries.com/news/</str>
</doc>

Thanks again for taking the time to help me resolve this.

Matthew

pwolanin’s picture

Category: bug » support
pwolanin’s picture

Status: Active » Closed (works as designed)