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
0 answers
3 views

Ss it possible to add alter query to add an "OR" operator condition to Search API alter that actually expands the results?

We need to alter a Search API query using hook_search_api_query_alter() to add an additional condition OR condition that is "any of the previous condition OR this new condition" Example: We ...
  • 1,103
0 votes
0 answers
6 views

How to make a Search API Facet to expand the results (the operator is set to "OR" but does not change the results)?

We have a Search API index with some Facets to limit the results by "State" and "Category" with another facet to "Include National" and the operator is set to "OR&...
  • 1,103
0 votes
0 answers
36 views

Customize search results page

Is there a specific way to customize the search results page in Drupal 10? I would like to change the look of how the results are displayed. I have used Views to create the look how list items but I ...
0 votes
1 answer
28 views

Using views_query_alter() hook to dynamically add a OR "where" to a Search API View?

We have a Search API View that we need to dynamically include results to the query that where filtered out. The use case is that the Search Index View shows a filtered list of node but we have a ...
  • 1,103
-4 votes
0 answers
65 views

Error after upgrade, PHP from 7.4 to PHP 8.1 and some required contributed modules

I am upgrading from Drupal 8.9.20 to Drupal 9.5.5 and getting 2 following errors in drush updb [Twig\Error\RuntimeError] An exception has been thrown during the rendering of a template ("You ...
  • 1
1 vote
1 answer
17 views

Display only search box with live search and no content with results

I have configured search API with autocomplete, the search box is exposed in a views block. But the block displays the default 5 results below the search box even if the box is not used yet. I want ...
1 vote
1 answer
84 views

Edit index config (Search API) programmatically and get the status index updated

I have a site with 14 pieces of news and 44 basic pages. I have created an index (Search API) with this bundle: and this is the index status (the content is already indexed during cron): When I ...
  • 3,531
1 vote
0 answers
37 views

Search API Facets: Filtered Results to Map (Leaflet) Shows No Updates to Views Page

When using post search results via a Search API Facets for node data, the initial results are displayed as a map content type (Leaflet) but when filtering down to further fields, the results page ...
  • 579
1 vote
0 answers
58 views

Is it possible to use OR condition in search_api_index view for exposed filters like "Fulltext search" or "Combine fields filter"

I have created search_api_index view. And I want to add filter criteria like on screenshot. or I choose OR condition, but the AND condition still works. It seems that OR condition is not applied. Is ...
  • 338
0 votes
1 answer
60 views

Facet blocks in a dialog don't retain applied facets

Cross posting an issue I posted from Drupal.org in the hope that it gets a bit more visibility here. I'm currently loading facet blocks via AJAX into an off canvas dialog provided by the core Dialog ...
  • 13.8k
0 votes
0 answers
33 views

Custom sorting using a MySQL statement instead of simple field

I'm using a view to list products from db index. I want to implement a custom sorting (my goal is to sort by current taxonomy term page, products having a specific node field field_MY_FIELD_NAME = ...
0 votes
1 answer
150 views

sort api solr search using custom view field using hook_views_query_alter()

Drupal 9.4.8. Search api solr 4.2.9 I have created a search api solr search in views One of the fields included in this view is a custom view field: node_date_raw_field From module hook_views_data():...
0 votes
0 answers
1k views

"Composer\InstalledVersions" not found in Solarium\Client::getVersion()

When i try to open configuration page of search API module i am getting the below error: The website encountered an unexpected error. Please try again later. Error: Class "Composer\...
  • 1
2 votes
1 answer
67 views

Is there a way to retain core search logging instead of having it get deleted with the watchdog logs?

We're using the core search module on a D9 site and use the "Top Search Phrases" report for search tracking but the results get stored in the watchdog table so they get cleared out when the ...
  • 1,103
1 vote
0 answers
18 views

Elasticsearch connector returns too many results

We are using the Elasticsearch connector and we noticed some inconsistent results in the search, specifically on acronyms or short words like sts, .net, crm. I set the fuzziness value to 0, and this ...
1 vote
0 answers
70 views

How to exclude a field from the SOLR search index for a specific content type

I would like to exclude all body fields from the search index for a specific content type. Reason: We have an Author content type with a bio in the Body field. However, for searches, we only want the ...
0 votes
0 answers
28 views

Pre-flag facets when searching products

I created a site with Drupal Commerce and I use search api (fulltext) and facets to search for products. The search works very well and also facets, but I would like to know if there is a way to have ...
  • 11
0 votes
0 answers
26 views

How to set up search_api to search short words with special characters

I was trying to set up search_api but I feel like I have tried all the settings and nothing seems to work. I need to search for names of products, e.g. "T+A M 40 HV". When I apply the search,...
  • 424
0 votes
0 answers
37 views

Search API Solr sorting with Entityqueue

i have a Drupal search api view with solr. I want to use entity queue for sorting the view and setting a specific order of nodes. However this does not work at all. I have added the relation with ...
0 votes
0 answers
32 views

Search Facets - Entity Type

I want to create a facet to filter search results by entity type (node and product in this case). I have the entity_type field added to my index ... And I have a facet set up that seems like it ...
-1 votes
2 answers
51 views

How can I translate Olivero default search string? [closed]

In the default theme for Drupal 9 (Olivero) I have the following string in my search box field: Search by keyword or phrase. I have tried to change it by going to admin/config/regional/translate (...
1 vote
0 answers
75 views

Facets not working with Algolia search

I am implementing Algolia search and using the following contributed modules Search API Algolia Facets After configuring the modules, the content/data indexing is working fine and is reflecting on ...
-1 votes
2 answers
90 views

Creating a category page when using the Search API module

I’m trying to build a Drupal Commerce store which is going to be my first timer with Drupal 8+. However, the approach described in the Drupal Commerce documentation regarding the creation of a ...
  • 424
2 votes
0 answers
57 views

Get Drupal core search results via jsonapi

I am using the jsonapi module to get node content for specific bundles for a mobile app and i am familiar with the filter, include and sorting concepts of the jsonapi. Now i want to get search results ...
  • 131
1 vote
2 answers
76 views

Can't uninstall default search module because the Commerce Base module is required

I want to use Search API + Solr on my Drupal (& Drupal commerce) site. The tutorials recommend to uninstall the core Search module. However, I can't: the UI at page /admin/modules has Search ...
  • 26
0 votes
1 answer
103 views

Rewrite url facet by taxonomy term machine name

I have a multi-facet search page, with those 2 facets : poste and type_de_contrat (= internship, open-ended contract...) It's working fine, but I'd like to rewrite the url, because it looks like this :...
  • 79
0 votes
1 answer
153 views

Show the count of the total results when searching with a search api solr view [closed]

I am working on a view which uses Search API Solr. When I search for an article, I want to see how many results Solr has found. How can I do this in Drupal 9?
user avatar
0 votes
1 answer
37 views

Exclude taxonomy terms from being choosen in facets

I am working on a search field with a facet which has a list of taxonomy terms. Some taxonomy terms I want to exclude from being choosen, because it is not relevant for people to know about. How can I ...
user avatar
0 votes
0 answers
67 views

Why are facets not displayed on pages?

I have two entities: Entity Product and Entity Product Category. Entity Product has an entity reference field on the Entity Product Category. Goal: Display categories and their number on the right by ...
  • 11
0 votes
0 answers
46 views

Solr still showing indexed items after clearning

I have a solr install that is hooked up and running. After clearing the index I am still getting search results to show up and the solr server is saying that there are still 19363 items indexed when ...
0 votes
1 answer
33 views

Remember the order facets where selected

The search API stores facets with a key and the URL is usually something like ?f[0]="facet_0&f[1]="facet_1"&f[2]="facet_2" Unfortunately, this array is rebuilt on each ...
0 votes
1 answer
88 views

Add a placeholder to search input text field [closed]

How can I add a placeholder for the input text of the search block (Search on my website)? I've looked around, but on Drupal 8 template.php has been deprecated and it's not an option. I also need to ...
0 votes
0 answers
48 views

How to group some exposed filters in a collapsible block

I have a view with several exposed filters The theme is based on bootstrap, so I'm looking for a way to group some of them within a collapsible or accordion block (Bootstrap example) I'd like to avoid ...
0 votes
1 answer
46 views

Render a fulltext exposed search bar separate from the rest of the filters

I would like to render my exposed fulltext search bar in a separate location from the rest of my search filters. My other exposed search filters are things like display number, sort order, etc... I am ...
1 vote
1 answer
46 views

Search is very slow for certain roles

I'm a bit lost here. I have a strange problem and don't know where to begin. I use the core search function on a website I build. When I am logged in as administrator this search function is working ...
  • 1,058
0 votes
1 answer
64 views

How do I apply different styles according to content type?

in a view I'm filtering content with search API /facets. In the view (field format) i've applied a specific style for the results, some sort of Bootstrap card. IT apply to all content index by search ...
0 votes
1 answer
57 views

How do I select multiple values with one checkbox?

With Facets module/search API, I have a checkbox filter where I need to merge some value. Example: vocabulary = color term = light red term = dark red term = light blue term = dark blue In this ...
0 votes
0 answers
297 views

How to alter the end date views query for search api

I'm trying to alter an exposed date filter in a view I created that uses solr search api. I noticed that the end date filter doesn't work unless I add a day to the end date. so for example if i have ...
  • 438
0 votes
0 answers
16 views

Show two unique exposed filters in different blocks for the same view

I have a view that has 3 exposed filters; two Taxonomy Terms and a Search Field. I want the two taxonomy terms to appear in the Left Sidebar and I would like the Search Field to appear above the ...
0 votes
0 answers
45 views

Drupal Solr No Results

I have a SOLR sever set up (using platform.sh). I have it configured, connected, and indexing. However, I get no results when I search. (I've tried search api pages and views - no results with either)....
  • 482
2 votes
1 answer
573 views

How to create a Solr search with partial matches and autocomplete?

I configured a search box for a drupal site and am a bit confused on how to get a search working with partial matches and a sensible autocomplete. Some basic details: Drupal: 9.3.9 Modules: Search ...
-3 votes
1 answer
60 views

How do I add an exposed form to search products?

I installed the Search API module and followed the documentation to set up an index and a search box using views and facets. It doesn't show an exposed form to search, even though there is a view and ...
2 votes
1 answer
255 views

Is there a way to default sort by date when no search keywords have been used, but default sort by relevance for all searches?

At present, my project has default search pages for sections of the site. They are per-content type. When the user goes the "search page" for the content type, they see a views-generated ...
  • 193
1 vote
0 answers
56 views

Add Relationship to Entity in a Content Datasource View?

Good afternoon, I have configured a (Search API) search index using an entity content type, but I don't need to index all the fields. Is there a way to add a relationship to the referenced entities in ...
  • 133
3 votes
2 answers
806 views

How to re-index all content for the core search engine?

Is there a way to re-index all content for the core search engine? In older versions, you could reindex with drush: drush search-reindex --immediate --verbose However, this does not appear to be an ...
0 votes
1 answer
34 views

Does the "Search keywords" exposed filter depend on the core search index?

If I create an exposed Search keywords filter for a view, does this functionality depend on the core search engine? Do I need to index the site at admin/config/search/pages for a Search keywords ...
1 vote
1 answer
87 views

How to place facet blocks

I got Search API and Facets configured, built a View Source, and connected the Facet to that source. Now I'm stuck with how to present that widget! With D7 Facets, it configured Blocks that I could ...
  • 133
0 votes
1 answer
107 views

Sorting on a custom date field is slower than sorting on relevance: Is there a solution?

I'm using search api with database backend on a Drupal 9.3.3 site. I've indexed 26,000 nodes of a custom content type and these include a custom date field: field_display_date The index is set up to ...
  • 193
1 vote
0 answers
28 views

Search: Do not index some parts of HTML

We're indexing the rendered HTML output (rendered_item, type "Fulltext") of pages into elasticsearch using elasticsearch_connector. Some parts of the HTML shall not be indexed because they ...
  • 143
1 vote
0 answers
69 views

How to hide a facet item if it does not narrow the results?

I have a facet of taxonomy terms with the links widget. There are 3 taxonomy terms displaying with the number of results in the bracket. Term 1 (3) Term 2 (2) Term 3 (10) When I select Term 1, the ...
  • 2,765

1
2 3 4 5
39