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
1answer
91 views

How can I programmatically change the parse mode?

We have a view that works with Search API and Solr search. The multiple search terms work with single quotes and with no quotes. I want to make the search terms work with double quotes as well. The ...
1
vote
1answer
105 views

Global $pager_total_items replacment

I updated a website to Drupal 8.9.6 version. I saw that the global variable $pager_total_items was used, but is deprecated since D8.8.0. So, I'm looking for an alternative to retrieve the total items ...
1
vote
0answers
35 views

Search API custom query processor [closed]

I would like to create a custom query processor to filter Commerce products, based on a user field and a product field. Users have a boolean field "hide special products", and products have ...
0
votes
1answer
42 views

Search API Database Search score calculation

I'm trying to understand how the Search API Database Search calculates the score for a search result. I understand Solr uses the Lucene scoring model and there's also command that can be used to ...
0
votes
0answers
27 views

How do I generate a search snippet similar to core search for a custom search API page?

I installed solr and search_api and search_api_pages. It's all working as expected but, for now, my new search page need a lot of configuration to display correctly. Unlike drupal core search, which ...
0
votes
1answer
92 views

How do I render search block form in theme template?

I've customized the search block in "block--search-form-block.html.twig" and it works using block layout on Drupal 9. Is it possible to render the Search Block directly in page.html.twig? I'...
0
votes
1answer
158 views

Search is broken after updating search_api_solr from 8.x-2.7 to 4.1.4

My Drupal site has a search form, which connects to a Solr index. All of this was working smoothly. But then I updated drupal/search_api_solr from 8.x-2.7 to 4.1.4 (which also required me to update ...
0
votes
0answers
21 views

Why does core Search fail to index the word "HEERF"?

The word HEERF is contained within the body/content of the node, but when I search for the word is is not found. Searching on "Federal" or "Cares" returns the page in the result ...
0
votes
2answers
87 views

How to change the url the core search form submits to?

The action value for the core search form is /search/node. How could I get it to go instead to a different url for a custom View?
0
votes
1answer
92 views

How to make a facet search on a taxonomy term contained in a paragraph contained in a content type?

On Drupal 8, I try to make a facet on a taxonomy term contained in a paragraph entity contained in a content type. Is it possible? My stack : Druapl 8.9.0 + Search API 8.x-1.17 + Facets 8.x-1.5 In ...
1
vote
0answers
11 views

How to add translation of terms to a search API index?

I have some media in the site default language, it is tagged by terms and the terms are translated. The media is not. How could I add the translated terms to the search index so it's possible to find ...
0
votes
0answers
29 views

How to stop spiders from crawling every combination of multiple drop-down pages

We have a site with around 10,000 pages and media items (mainly PDFs) We use various tools to catalog, check and report on our site and, of course we encourage good spiders (Google et al.). The ...
0
votes
1answer
33 views

Views + Search API not properly sorting by Commerce Price (seems random)

I have a search index View of product variations. The commerce_price field is indexed and exposed as sort option. However, when sorting by the price it appears mostly in order (Asc or Desc) but some ...
0
votes
1answer
85 views

How to combine two filters in search api views?

I have a search index which is indexing both content and files. I have configured the search api views which displays the search results. On this view, I have a filter on type which displays the ...
2
votes
1answer
336 views

How can I programmatically reindex Commerce products to AWS Elastic Search?

I am using Drupal 8 Commerce module. I am using Elastic Search on AWS platform. From the Admin whenever product is saved, those changes are directly applied on Elastic Search server, but when I try ...
1
vote
0answers
162 views

Search API : Elastic Search gives priority to sort instead of title

I am using below modules for Search module: drupal/elasticsearch_connector": "^5.0@alpha" drupal/search_api: "^1.8" I am using AWS Elastic Search. What the issue I am facing ...
0
votes
0answers
109 views

How to use a glossary exposed filter in search api views?

I have a search api views. I want to display a glossary filter on title. I have searched many articles to implement it using a contextual filters. But the options of context filters can be seen in a ...
0
votes
1answer
89 views

Change sort order for view when exposed filter text field submitted

I have a view that by default is ordered by date. It has several exposed filters one of which is for filtering by text (we use it as a search field). I'd like the view sort to change to Relevance when ...
0
votes
0answers
60 views

Speeding up Search API DB search?

I'm using Search API with it's build in Database search, and while the results are much better than the default Drupal search, the speed is quite slow. I'm seeing 10-15 seconds to get the results page ...
1
vote
2answers
40 views

How to order search results based on author field content

I am using Drupal 8 search views, I would like to order the search result so that the content that's author has field "X" filled out should be ordered first and all other content where the ...
1
vote
0answers
17 views

What is the most common use case for the search_api "Index Hierarchy" processor given it is limited to indexing entity ids?

In search_api the "Index Hierarchy" processor is described as being for the filtering on parent use case: Allows you to index hierarchical fields along with all their parents. Most ...
0
votes
1answer
42 views

How can I allow editors to manage many taxonomies while choosing which terms to boost and which to make visible?

The system I am working on has about 15 taxonomies. It may have 30 or more eventually. We didn't want to add a field for every taxonomy since the editors would have hated that. Initially we went with ...
1
vote
1answer
42 views

Custom redirect to an url with "+"

I use search api module and a view of products. If I put the search text block and I do a search, It redirect to an url like this: <my domain>?search_api_fulltext=word1+word2+word3&sort_by=...
0
votes
1answer
22 views

How to edit Advanced Search Form's Content Type checkbox-list using hook_form_alter

I have a Drupal 7 setup. I want to remove few Content types from the Content Type checklist that appears in Advanced Search form. I could see that advanced search form comes in 'advanced' field-set of ...
0
votes
1answer
22 views

Which is the highest version of Solr that is compatible with the "Apache Solr Search" module?

I have a setup of Drupal 7 with the Apache Solr Search module. I am planning to upgrade the solr server's current installed version(3.6) to a higher version. The latest version of Solr available in ...
1
vote
1answer
29 views

Search Results page. Move the search form after the results?

Apparently the only template file to edit is for an individual search result, located at core/modules/search/templates/search-result.html.twig. So you can't move the search form after the results and ...
0
votes
1answer
68 views

How to include media documents in search

Is there any way to include documents I created with the media core module into the search form of the page? I only found the categories "users" and "nodes".
0
votes
1answer
77 views

Remove dots ( ... ) from default search results descriptions ( snippet )

I want to remove dots from search results items descriptions to search result page ( Default Search ), i have used Drupal default search for the search result page so how to remove the dots from the ...
-1
votes
1answer
97 views

solr is running, but search isn't working: "The Solr server of Solr could not be reached."

I am using Search API Solr (Version: 7.x-1.14), and search was working fine but has stopped working. I now see "The Solr server of Solr could not be reached" at admin/config/search/search_api. In ...
1
vote
1answer
257 views

Change exposed filter date format with Search API

We are using Search API for a customer website and we have a View with a start and end date exposed filter. The view only filters correctly if we use the m/d/Y format, which is not valid in Brazil, ...
0
votes
0answers
18 views

search-index with drush fails on field_collection error

I've been rebuilding my search index using "drush search-index" for the better part of the day. There have been a few odd errors that I have handled as I went along, making some fixes in the process ...
1
vote
1answer
342 views

How can you hide "Your search yielded no results." when no keywords have been entered on the search page?

On the core default search page located at /search/node, if you visit this URI the page displays "Your search yielded no results." It displays this message whether keywords have been entered that ...
1
vote
0answers
40 views

How to create non-entity(custom) Index in Search API

I'm working on a website that calls another external web service. I want to collect those data somewhere on the D8 website. then based on them I'll provide some REST endpoints for the FE layer. one ...
0
votes
1answer
104 views

How to get replacement pattern for Search API's fulltext search in global text area header

In Drupal 7, I'm currently using the default core search, and a view for node search results. I have a global text to pull in the replacement pattern for the term that were searched for. I get the ...
0
votes
0answers
20 views

How do I create a View to use Bootstrap Paragraph fields and group by the title?

I have a View for FAQ's, and an exposed combined fields filter. I created an FAQ content type, and added a paragraph field that contains "Question" and "Answer" fields. I cant use Search API, and want ...
0
votes
1answer
224 views

"drush sapi-i" command which calls drush_backend_batch_process() fails with "Output is empty"

I am trying to integrate ElasticSearch with Drupal and till now everything seems to be working except that the command drush sapi-i crashes with the output: > 'C:/xampp/htdocs/my-project/docroot/...
0
votes
1answer
56 views

Solr Search Custom search form template

I have solr search setup on my drupal8 website. I have a view setup that has two pages in it. I have the search box via an exposed form placed as a block in my header region. What I want to do is to ...
0
votes
1answer
195 views

Exclude node from search API results based on values in existing fields

My content node includes a verified checkbox that's marked by a human reviewer who then also enters a date. The node is verified only when the box is checked and the date is entered. A content node ...
3
votes
1answer
83 views

Avoid hard crash if user searches when Solr stopped

I use search_api_solr with a server-based Solr installation. Works fine. For reasons I won't explain, the Solr service is stopped sometimes. If a user does a search while Solr is stopped, they crash ...
0
votes
1answer
35 views

Solr search not returning content type

I have a site set up with Solr search. Drupal says 100% of the site is indexed, and the Search appears to work for most content types and their fields. However, the search does not seem to be ...
0
votes
1answer
183 views

Combined Fields filters and missing custom search api fields

Drupal 8 I am using Search API and Views to search several fields from several content and media types. For example, I have a custom "description" field for Media->files so users can add a searchable ...
0
votes
1answer
266 views

How to change the condition operator in the search api query?

I have a date field facet filter on my search api views page. When I select a date in the filter, the search api display those results which has that date value selected in the date field. I want to ...
-3
votes
1answer
71 views

How to display a date facet in a date popup/picker?

I have a date range field in my content type. Is there any way to display a date popup/picker facet on my search page. Any workaround? through facet api, javascript etc? Because I have searched all ...
0
votes
1answer
677 views

How do I use hook_search_api_solr_search_results_alter() to alter search results?

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
155 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 ...
5
votes
1answer
250 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
2answers
333 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
178 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(...
1
vote
1answer
610 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
1answer
131 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 ...

1
2
3 4 5
39