Problem/Motivation

To display specific result inside block plugin and provide view more link.

Proposed resolution

Create the offset , limit , view more link as a texfield.

Comments

dishabhadra created an issue. See original summary.

dishabhadra’s picture

StatusFileSize
new7.63 KB

Hi Piyuesh :

[1] Added the offset , limit , view more text field.
[2] Based on offset and limit parameter make the changes in search and searchall function.
[3] For title redierction written the select query and harcoded the tablename.

Review the code.

dishabhadra’s picture

StatusFileSize
new6.66 KB

Remove the harcoded nid and table name.

dishabhadra’s picture

StatusFileSize
new7.07 KB

Need docid in result.

dishabhadra’s picture

StatusFileSize
new8.24 KB

- Added the limit , offset and dynamic link field for view more.

dishabhadra’s picture

Status: Active » Needs review
AsadKamil’s picture

It seems the patch doesnt apply.Please check
Thanks

root@asad-Vostro-3550:/var/www/html/git/custom_solr_search# git apply -v provide_configuration-2772021-5.patch 
Checking patch src/Plugin/Block/CustomSolrSearchResultBlock.php...
error: while searching for:
use Drupal\custom_solr_search\Search;
use Drupal\custom_solr_search\SearchSolrAll;
use Drupal\custom_solr_search\FilterQuerySettings;

/**
 * Provides a 'Result' Block

error: patch failed: src/Plugin/Block/CustomSolrSearchResultBlock.php:10
error: src/Plugin/Block/CustomSolrSearchResultBlock.php: patch does not apply
Checking patch src/Search.php...
Checking patch src/SearchSolrAll.php...
error: while searching for:
   * @return array $results
   *   Array of search results.
   */
  public function seachAll($keyword, $options = NULL){
    $servers = \Drupal::service('custom_solr_search.solr_servers')->getServers();
    $results = array();
    foreach ($servers as $server_machine => $server_display) {
      $result = \Drupal::service('custom_solr_search.search')->basicSearch($keyword, 0, 5, $server_machine, $options);
      $results['docs'] = array_merge($results['docs'], $result);
    }
    return $results;
  }

error: patch failed: src/SearchSolrAll.php:31
error: src/SearchSolrAll.php: patch does not apply
root@asad-Vostro-3550:/var/www/html/git/custom_solr_search# 
dishabhadra’s picture

Hi AsadKamil ,

This patch will applied to dev version of module.
Because we did many changes but we have not released the module with updated code so this patch will applied to updated code.

So we will release updated version very soon.

piyuesh23’s picture

Status: Needs review » Closed (fixed)

Merged & pushed to 8.x-dev.