Hello.

I am using CCK and Node Reference to link Course Material nodes to Course nodes in a many-to-one relationship. I'm also using Apache Solr to search the contents of the Course Material nodes. I'm also using File Attachment to add files to the Course Material nodes and using Apache Solr+Apache Solr Attachments for indexing and for search results.

The search results look like this (when a file is returned):

lecturenotes.pdf
• Write a system of linear equations using matrix notation. • Use Gaussian elimination ... . • Compute the inverse of a matrix when it exists, use the inverse to solve a system of equations, describe for what systems of equations this is possible. • Find the transpose of a matrix ...

application/pdf attached to: Lecture notes
File attachment - admin - 2010-08-11 16:47

So lecturenotes.pdf is attached to the node "Lecture notes." That node (Lecture notes) has a CCK node reference field pointing to a node called "MATH 307 Applied Linear Algebra." I would like to include the title of that referenced node in the search results, perhaps something like

lecturenotes.pdf
• Write a system of linear equations using matrix notation. • Use Gaussian elimination ... . • Compute the inverse of a matrix when it exists, use the inverse to solve a system of equations, describe for what systems of equations this is possible. • Find the transpose of a matrix ...

application/pdf attached to: Lecture notes - MATH 307 Applied Linear Algebra
File attachment - admin - 2010-08-11 16:47

I'm using the bluemarine theme, if that helps. I'm not sure where to begin. Should I be looking for a function to hook into? Or should I be trying to customize the theme?

Comments

Quarantine’s picture

I have to bump this since I'm a beginner to Drupal and would like to know how to customize my search results in apachesolr as well.

Is there a tutorial somewhere related to this?

maxmmize’s picture

sub

jeffreyvddb’s picture

Subscribe

mjoyce’s picture

I solved the problem with the search results and documented the result on our Drupal Users Group website.

https://foss.stat.ubc.ca/ubc-dug/blog/mjoyce/customizing-apache-solr-sea...

maxmmize’s picture

Great Job. Nice tut. Have you figured out a way to increase the length of the teaser (description)?

mjoyce’s picture

No, I haven't. But some other folks around here are having that issue, so maybe I'll look into it today.

maxmmize’s picture

<copyField source="body" dest="teaser" maxChars="300"/>

This is from: http://wiki.apache.org/solr/SchemaXml

Wondering if this should be increased to 600 and then explode it in search-result.tpl in my template override? Not sure if it will work and I have well over 250k doc's on my site. So, doing it and finding (testing)the darn thing would be a nightmare for me.

maxmmize’s picture

williams_sa’s picture

I'd *love* to see this tutorial... but the link's dead.

PDNagilum’s picture

I'd love to see it too

TheBarnacle’s picture

Hi,

I just tried this and the link is broken. Has the tutorial been moved somewhere?

dreamriks’s picture

I would like to see this somewhere.