Is there a way to create a "More like this" block with the Views, and the Search API Solr modules?
I saw this, but it doesn't work.
2 Answers
Here is the recipe for search_api_solr as per the OP. Note: both apachesolr and search_api_solr leverage Solr's builtin more like this feature. It is, therefore, not available to normal search.
- Enable some modules: search_api, search_api_solr, search_api_views
- Create a Search server of the Solr class.
- Create a Search index (or use the Default node index) and point your Solr search engine at it.
Create a new view on your search index NOT on Search index. eg:
Show *Default node index* sorted by *unsorted*
Continue and edit.
- Reveal Advanced and Add a Contextual filter.
- Filter on Search or scroll down to find Search: More like this.
- Under When the filter is not available select Provide default argument: Content ID from URL.
- Configure by selecting the Fields for Similarity that you want to determine likeness on.
-
"9.Configure by selecting the Fields for Similarity that you want to determine likeness on." I am interested in Taxonomy term likeness.How can I do that?thanks– DionDec 18, 2013 at 14:19
-
@sokratis - If they are in the indexed in the search index (e.g.
default node index
), you can select them. Jan 23, 2016 at 20:17 -
Also, note that the
search_api_views
module is bundled with thesearch_api
module itself, not a separate contrib module. Jan 23, 2016 at 20:17
You don't need anything to create the 'more like this block', just go to admin/structure/block/manage/apachesolr_search/mlt-001/configure.
However, you can follow this tutorial on how to create it with the Views module, but it's based on taxonomy terms.
-
1Note: He is talking about using the Search API Solr module, not the Apache Solr module. Feb 8, 2013 at 16:57
-
-
1I not sure about the normal search module. The only modules I know that provide that is the drupal.org/project/apachesolr and drupal.org/project/search_api_solr modules. Feb 8, 2013 at 22:17