I have the MLT block in apachesolr_search working fine.

I have the latest dev version of search_api and search_api_solr.

The options that I am seeing in views do not seem to match the description in the mlt feature request nor that of the readme.txt.

Is there any step by step instructions I can follow, or is there some step I might have unintentionally skipped?

Comments

micheas’s picture

I have updated the xml file on the solr server to the latest one that includes the mlt additions to the xml.

drunken monkey’s picture

The following steps should let you setup an MLT block:

- Create a view on the search index.
- Add fields (and/or choose a display mode) and filters like normal.
- Add the "Search: More like this" contextual filter.
- In its config form, under "When the filter value is NOT available" select "Provide default argument" > "Content ID from URL".
- Create a block display for the URL and let the block show on selected (or all) node pages.
- If you aren't using this with nodes, you have to get the ID of the item you are using from the URL, not the "Content ID". Unless it's a taxonomy term or user, you'll probably have to write the default argument handler yourself.

micheas’s picture

My problem was, that I was choosing "search index" and not the name that I had assigned to my search index.

Everything became clear after that.

micheas’s picture

Status: Active » Closed (works as designed)

I will say that it seems a little slow. But it is working.

alanom’s picture

If this is going to be the documentation for More Like This it should probably include a link to the initial issue so we can see what problems that feature was and wasn't designed to solve - I believe this is it #1111852: Add a "More like this" feature

arrubiu’s picture

Hi!
I'm using the stable versione of this module, but I try to add a mlt block I obtain an error 400, bad request.
I follow instruction from #2

arrubiu’s picture

any news?
I try it on a simple page and if I place the block I obtain this error:

An error occurred while trying to search with Solr: '413' Status: Request Entity Too Large.

ressa’s picture

I followed the steps from post #2, remembering to select the correct search index (Product index), but can't seem to get any results when I click Preview.

nithinkolekar’s picture

Version: 7.x-1.x-dev » 7.x-1.8

Same problem here :(. Followed exactly same steps as #2 , all fields are indexed but results are not showing.
While testing in view's preview by passing existing node id as parameter, it is displaying 'No query was run'.

sphism’s picture

Same here, can't get this to work ... hmm

[edit] The view preview doesn't ever seem to work, but the block does work when i place it on a node page

[edit 2] Hmm... well the views preview is working now too, so everything is working fine. How odd. Possibly it doesn't work when you first make it, but does after a save... not sure... something is odd tho

Andre-B’s picture

Issue summary: View changes

same problem here, solr 4.5 seems to be configured correct, double checked the api and did a manual search using mlt. but the view with more like this contextual filter is not showing anything.

Andre-B’s picture

Category: Support request » Bug report
Status: Closed (works as designed) » Active
Andre-B’s picture

Version: 7.x-1.8 » 7.x-1.11
drunken monkey’s picture

Please debug the request sent to Solr and the response received, as described in the handbook, to see what could be wrong there.
Or did you already manage to solve this?

Amir Simantov’s picture

Attention: mlt does not work out of the box. See the service classes supporting it.

drunken monkey’s picture

Status: Active » Closed (outdated)

This issue is five years old, please just don’t bump it for no reason!

Amir Simantov’s picture

My intention was good Thomas, I wanted to document it also here in case that someone will stumble upon this page and not the other one where you explained to me what I have commented here. Sorry that it was not clear. I appreciate your hard work and would not intentionally harm it. My appologies.