Questions tagged [search]

Use it for the Drupal core module or any module extending its functionality, or aiming to replace it.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

How do I use hook_search_api_solr_search_results_alter() to alter search results in D8

I want to alter the results of a Drupal 8.x search_api_solr search using hook_search_api_solr_search_results(): function sbn_search_api_solr_search_results_alter(\Drupal\search_api\Query\...
0
votes
1answer
29 views

How to query solr server from php in Drupal 8

How do you query solr server from php in Drupal 8? I have installed search_api, search_api_solr and search_api_attachments. Also have Solr v.8.4.0 installed. I installed php SolrClient for Centos 7 ...
0
votes
0answers
7 views

Search API File search missing filter operators

D8 Webiste Probably missing something obvious here but... I am trying to create a view that can search an index generated by Search API. I want to include files in the search. Ideally with an ...
0
votes
0answers
17 views

Solr — Facetting on fulltext fields is not yet supported. Consider to add a string field to the index for that purpose

I'm currently using Search API Solr 8.x-3.7 on Drupal 8.7.1. Everything looks correctly set up, but I'm getting this error message: Drupal\search_api_solr\SearchApiSolrException: Facetting on ...
4
votes
1answer
163 views

Programmatically executing a node search

Is it possible to programmatically execute a node search? Maybe via NodeSearch or Drupal\search? The closest I could get was to programmatically do stuff such as: \Drupal::service('search.index')-&...
0
votes
0answers
11 views

Drupal 7 and apachesolr module compatibility

I am trying to upgrade our current Solr from 4.x to 7.7.2. We have a Drupal 7 installation, that has the apachesolr-7.x-1.6 module installed. I have been researching but cannot find any information, ...
0
votes
2answers
31 views

How to get parent node from a attachment in drupal8 search api results

I have apachesolr index search with Search API attachments. In the results I get a link to the file but I would like to get a link to the parent node. I tried in the view but there is no such field ...
0
votes
0answers
21 views

Database Search API Programmatically error

I am trying to perform a search programmatically with our database search api (no solr or other servers) with the following code: $query = \Drupal\search_api\Entity\Index::load('us_search')->query(...
0
votes
1answer
45 views

Solr search with exact match

I am using drupal 8, search api and solr on our site. In views, I am using full text search with direct query option. Search is working for multiple words. What I want is when I search with double ...
0
votes
0answers
9 views

How to display 'Sort by' filter dropdown in results section?

I have a search page that has filters on the left bar and results on the right. I want to display the 'Sort by' drop down on top of the 'Results' section. I have a custom template for the results ...
0
votes
0answers
9 views

How can I use Tokens [uc_Coupon] with Search API with a custom coupon Server/Index?

I was wanting to create a custom block where an end user can search with a Search Input for an UberCart Store Discount Coupon via the Search API and after some 4 hours research, I'm stumped as to ...
0
votes
0answers
19 views

Expose Drupal 8 Search API / search Pages

I am using the Search API / Search Pages module to perform searches on our D8 site. Does anyone know if there is an extension to the search module to expose the searches via an API or web services? ...
0
votes
1answer
21 views

Excerpt of Search API index is cached

I'm using the search_api extension (V 8.x-1.14) with the Database search (no solr, etc.) I use the search block which is created by the search view (/search path) I want to show the highlighted ...
0
votes
1answer
23 views

Display the URL of where the content is located in my search results

I'm using SOLR search/search API on my Drupal 8 site and I've set the view to display the following two fields: Content datasource: Title (The title & link to the page) Search: Excerpt (...
0
votes
0answers
11 views

Creating search form that will query SQL database and display results on a custom block

I am new to Drupal and have learnt about custom blocks. Basically, I am trying to create a search page where on the left column will have all the filter/search criteria. On the right column the ...
0
votes
0answers
22 views

Proper integration of Paragraphs in Solr Index

I have a taxonomy entity "Politician" which has a Paragraph field "Party membership", which consists of a Date Range field for the membership and an entity reference to the taxonomy entity for the ...
0
votes
1answer
20 views

Search results are not displaying on top by relevancy [closed]

I have to use "Search API" module with configured on solr server and indexed. The search results are displaying but "relevancy" content is not on top of the page. Example #1: Search key word: course ...
0
votes
0answers
39 views

Remove duplicate records from view result with pager

My project is setup in Drupal 7 and i am using search API for display my custom search result. Actually i want to show search result based on two content types content so i have configure the search ...
0
votes
0answers
17 views

Seach Page Split into Form Block & Results Block

I already created a search view like /search it is giving form and results finely but Views UI is disabled in my server . So i want to split this search page into 1) A block which contains a search ...
0
votes
0answers
14 views

Sort Search API results by taxonomy reference field name (and not TID)

I have a views index page that when displaying results without a text search I want to display sorted alphabetically by a taxonomy reference fields name. I can get it to sort by this reference field ...
1
vote
1answer
113 views

How to enable click-sorting for views table display based on Search API index?

I'm trying to create a view with table display based on Search API (database search) index, with column-sorting (column set as Sortable in the display settings). However, this option isn't available ...
0
votes
0answers
21 views

How can I write query of search api to get row count for every condition

$query_search_api = search_api_query('search_products', $options); foreach($arrFilterSa as $machine_code => $efield_value) { if($efield_value) { if(...
0
votes
0answers
54 views

How to display values of certain taxonomy term above the table with the search results list based on content type, related to entering search query?

I made a view which displays a search result list as a table. The searching process works inside one content type using Search API. The system also has to look for between taxonomy terms (name) first ...
0
votes
1answer
20 views

Display a view in search results

I have Search API SOLR running on my Drupal 8 site and I'd like to know if there is a way to have view pages display in my search results. As an example, I have a database content type that allows ...
0
votes
1answer
33 views

Search Solr View with exposed filter fullsearch return no results

I setup a Solr search index (Solr 7.7.1 and Search API Solr 3.2) with custom entities. I have several fields indexed and 2 of them are fulltext. Additionally : I setup the view with an exposed filter ...
0
votes
1answer
17 views

Facet block is not getting display on search page created by view

I am using the Search API module with an Apache SOLR server. On my search page, the search results are rendering properly, but the content type facet block is not getting render in any defined region. ...
0
votes
0answers
11 views

Searching for filenames with SEARCH API

I want to create a search API view that can search Content and Files based on keywords. I can search content fine but I am having difficulty making it search filenames. This is a Drupal 8 site. I am ...
0
votes
1answer
48 views

Display the results of a form submit on the same page just under the form

I have created a form and it takes in 3 values which are Brand, Item and Zipcode. The values are queried and the results are fetched the database table. I want the results to be shown in a table ...
1
vote
0answers
25 views

Search Api Solr view cannot retrieve node. ID incorrect?

Drupal Core 8.7.8 Search API 8.x-1.14 Search API Solr 8.x-3.7 Solr 8.1 Solarium 5.1.4 The current Solr config is exported and loaded in Solr. Indexing from Drupal works. The Solr Index View shows ...
0
votes
0answers
14 views

Keep open state of a block when the page is reloaded

in a search_api view I have several facets links. These links are placed inside several block. If I open a facets block (collapse block), and I click on a facet link the page is reloaded...and the ...
0
votes
0answers
10 views

Distance based search view to filter on near by location

I have these module installed. geocoder geofield geofield_map addressfield gmap I have a geofield field in my content type which saves the lat long from the address field. I have created a view, ...
0
votes
0answers
17 views

How to combine two operators in search api full text search?

I have a search api view. I have an exposed filter for full text search. In the filter settings, I am using search keys and in Query settings I have selected multiple terms. I used this settings ...
0
votes
0answers
6 views

Elastic search - Not parsing full stop?

I have used Elastic search connector in my project for Indexing. There is this field named "Body" of "Basic HTML" type. While indexing , In response , Body field is only displaying all texts , ...
0
votes
0answers
13 views

using search api solr views, how could i get a list for all discrete values a field

i have created a view, with nodes indexed on solr. My problem is that the view is about a content type, which has a field which is a node reference to another content type. So how in the filter area, ...
0
votes
1answer
11 views

use a view template that exists for content view search from database, to a solr indexed fields view, so as to have visually the exact same result

In Drupal 7, i have a view named say default-view to display results. I have disabled the default search and enable module 'Search API' and Search API SOLR (used for Backend) to perform search in ...
1
vote
1answer
29 views

Search using view and facet as block

In my project I need facet search as block view that need to be included in content region. So I created View as block and added facet block in header of the view. Also need infinite scroll, so ...
-1
votes
1answer
51 views

How to override the default search block and make a button with Font Awesome?

I want to override the default search block of Drupal and create a button like the image below: However, I do not know how to do it. I have tried using hook_form_alter as well but it is not working: ...
0
votes
0answers
12 views

How can I make search_api_solr and views exposed filters work with facets?

I am trying to implement search for a new client's site and am at a loss about how to complete it. Our Setup ApacheSolr 7.x server using search_api, search_api_solr, facets, facets_pretty_paths. ...
0
votes
0answers
56 views

Sort by date in view with results from Solr Search API

I create release notes section for my website where I fetch a paragraph from the specific content type. I have configured one index with fields such as name or status. In addition to that, I added the ...
0
votes
1answer
29 views

How do I make the exposed filter values available as tokens for text areas

How do I display (or render in twig) the search term, entered in the search field. When you enter a search term and click on the search button, you will go to the search results page (view). In the ...
0
votes
0answers
16 views

Drupal 8 facets search as block in a page

I have created facet search view and embed it as block in one of my page ? But when user type something or apply filter, it will redirect to search page and display result. How can I update result in ...
0
votes
0answers
53 views

How can I have facet items set to disabled instead of hidden if no results?

We currently have a Views page with Search API and Elastic Search. There are 3 facets available: Category (radio, single selection) Range (checkbox, multiple select allowed) Type (checkbox, ...
1
vote
0answers
19 views

How to mark related entities as dirty in search api module when edited?

I am using Drupal 7 with the search api. I understand that one of the 'common pitfalls' of the search api is 'Changes in related entities don't lead to re-indexing'. I am bringing in a field called '...
0
votes
0answers
12 views

Advanced forum search view ignores topics first post

Advanced forum module comes with the search view. It searches for a user inputted search term in forum topic content type and returns those topics that contains this term in its comments. The ...
0
votes
1answer
33 views

How to limit the words in search api autocomplete suggestion?

I have a requirement to limit the words to show up in row of autocomplete suggestion. Now its showing titles but problem is titles are too long and suggestions are covering entire width of the screen. ...
0
votes
0answers
98 views

How to alter search api autocomplete to exact match?

I have installed search api autocomplete module. I have configured it also but the requirement is to it should search only 'starts with word'. now the result is searching if a word present in mid of a ...
0
votes
0answers
18 views

Custom Search API sort logic

I have content (multiple content types) which are tagged by a taxonomy that indicates the geographical region they're relevant in. The content is indexed using Search API and Solr. Each user is also ...
0
votes
0answers
23 views

search_api_solr adding boost/weight/importance to a taxonomy value

I have a Taxonomy referenced from entity reference fields on multiple Content Types. It's "version". So what version of the software relates to the content being read. Often, this content is nearly ...
0
votes
0answers
24 views

How index on solr nodes from a content type, that belong to a certain organic group

I am using Search API Solr and Search API modules In order to index a certain content type's fields. I also use organic groups. So I need to index only the nodes that belong to say organic group with ...
0
votes
0answers
24 views

Search API boosting results how to

I followed the guide via this article: https://www.easternstandard.com/blog/2018/05/drupal-8-search-how-get-better-more-intuitive-search-results-using-search-api Search API is searching both content ...