Talk to Michael Hess about a possible approach.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 230375-15-D6.patch | 1.3 KB | janusman |
| #10 | 230375-10-D6.patch | 898 bytes | janusman |
| #4 | apachesolr_morelikethis.diff | 14.47 KB | mikejoconnor |
| #3 | apachesolr_morelikethis.diff | 14.46 KB | mikejoconnor |
Comments
Comment #1
mlhess commentedThe code below is called from a block hook and displays more like this results. Notice: I had to update solrphpclient with the lasted version, in order for this to work. This code is alpha and has some bugs. I need to read up on how the solrphpclient returns the morelikethis results. Also I did not the newest solrphpclient with anything other then my function below.
Comment #2
robertdouglass commentedThanks. This is a great start and I look forward to finding some calm time to look at it closely in the context of the ApacheSolr module.
Comment #3
mikejoconnor commentedmlhess,
Thanks for the great start. I've have the beginnings of an apachesolr moreLikeThis module together. It requires the new version of the SolrPhpClient(see issue 304388). I've tested this using Solr 1.3.0
There is still some work to be done, but I wanted to get something committed asap. Here are some limitations.
It doesn't allow for term boosting
It creates the query based on the current node you are viewing, rather than allowing the site administrator to create a custom query.
Comment #4
mikejoconnor commentedTry this one instead.....
Comment #5
mikejoconnor commentedSwitched status to code needs review, and changed the category to feature request.
Comment #6
robertdouglass commentedCommitted a version of this to D5. Please use it to upgrade to D6.
Comment #7
mikejoconnor commentedAssigning to myself
Comment #8
robertdouglass commentedThis warning is showing up in my logs using the D5 version:
Invalid argument supplied for foreach() in /var/www/drupalorg/sites/solr.robshouse.net/modules/apachesolr/contrib/apachesolr_mlt/apachesolr_mlt.module on line 86.Comment #9
robertdouglass commentedI gone and done it.
Comment #10
janusman commentedIf no docs match a node, $r['docs'] is empty and the foreach in apachesolr_mlt_suggestions() fails. This happens if the current node has not yet been indexed in Solr, for example.
Here's a patch for D6:
Comment #11
janusman commentedJust found out that changing the block's name in admin/build/blocks does not override the setting given in /admin/settings/apachesolr_mlt ... is this a bug?
Comment #12
mikejoconnor commentedI think so. Views 1 allows the block name to be changed in admin/build/block
Comment #13
janusman commentedGetting today's 6.x-1.x-dev version from CVS results in a broken MLT configuration page. It seems the get_fields_in_index() method was eliminated from Solr_Base_Query.php
The error is:
Fatal error: Call to undefined method Solr_Base_Query::get_fields_in_index() in /opt/lampp/htdocs/dev/6/sites/all/modules/apachesolr/contrib/apachesolr_mlt/apachesolr_mlt.module on line 275
And occurs when calling admin/settings/apachesolr_mlt/configure_block (Add a new MLT block).
Switching to "bug report" as this is already committed. Perhaps it should also be critical? =)
Comment #14
pwolanin commentedIt was moved to the new class that extends Service.php
Comment #15
janusman commentedAttached is a patch for #13 for D6-dev
#11 is a mystery since (to me) it seems the code is correct.
Comment #16
mikejoconnor commentedResolved both issues(#10 and #13) in DRUPAL-6--1, and the issue in comment 10 in the DRUPAL-5 version.
Changing the block name in admin/build/block does override the title on in the apachesolr_mlt configuration. I'd like to look into this more, but we should track it as a seperate issue. If you are still experiencing it please open an issue and document a few things about your install, in particular what type of caching you are running.
Thanks