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

Programmatically querying via SearchApiAcquiaSearchService

I am working on a site where querying using SearchApiSolrService is successful. However, when I deploy to Acquia Cloud and attempt to access the Acquia Search using the SearchApiAcquiaSearchService I ...
0 votes
1 answer
11 views

Is it possible to have a Search API Facet to expand the results? Basically, querying this facet OR this facet?

We have a Search API View (Solr) using facets and our nodes have two separate fields for the facets. One is an address field and the facet is built on the address US States and the other field is a ...
0 votes
1 answer
684 views

SearchApiQuery - possible to remove a filter?

The query parameter that is passed to search_api_query_alter has SearchApiQueryFilter member. It contains a protected array of filter elements. I can add to this by calling the createFilter() and ...
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 ...
12 votes
5 answers
6k views

Highlight searched keyword using exposed filter views?

In a view and I added an exposed filter: Search: Search Terms filter It works fine, but I'd like to highlight the searched keyword in the results. How can I do it?
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&...
2 votes
1 answer
746 views

Search Api Autocomplete doesnt filter by language

We're using Search API Autocomplete with Search API 7.x-1.9 on a site set up with Solr (Websolr) serving nodes in both English and German. I'm looking to be able to filter the results by ...
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 vote
1 answer
1k views

In search result page, pagination is not showing up

I have migrated a site from Drupal 6 to Drupal 7. I have rendered the search form in page.tpl.php as follows: <?php $block = module_invoke('search','block_view','form'); print ...
0 votes
1 answer
451 views

Search not finding search term from page title

Using the default database search index in drupal 8, when I search for a term from the a page title, sometimes it shows the result and sometimes it shows nothing, even though i enter the exact page ...
0 votes
1 answer
707 views

How to filter Search API index view by taxonomy parent

I am using the default database server that comes with search api. I have the Hierarchy Index ticked and I also have the taxonomy field that I want selected. Could someone give me instructions on how ...
-4 votes
0 answers
70 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 ...
0 votes
1 answer
630 views

How to delete a file attachment from the apachesolr index

My file attachments are indexed using apachesolr attachments 7.x-1.x-dev. I have a custom module that physically deletes a file using file_delete(), but file still remains in Apachesolr index even ...
3 votes
2 answers
1k views

How do I get comments to be indexed?

I'm not sure if it's actually doing this; I can't see any options for comment fields in the configuration. How can I check? Does it say explicitly somewhere?
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 ...
0 votes
1 answer
891 views

Search API group by issue with views

I have a content type thats is called course which has a field that is a reference to a taxonomy called category. My specification tells to build a search where users can search for the course title,...
2 votes
1 answer
886 views

Is it possible to show views exposed filters in the facet current search block?

I have a facet search with Facet API, Search API, and a Solr backend with the Search API Views integration. I am using the Current Search block (part of the Facet API module) to display the currently ...
2 votes
1 answer
504 views

Having issues getting solr search facets to appear on non-search pages

I'm using the solr search integration module with facet api on drupal 7 and I'm having issues getting the facets to show on non-search pages. I've checked the box for non-search pages and added a few ...
0 votes
1 answer
654 views

Warning: uasort(): Array was modified by the user comparison function in FacetapiWidget->applySorts()

I'm trying to build my own sorting function implementing hook_facetapi_sort() and sorting the following data by weight. name, weight dog, -2 cat, 1 zebra, -5 dolphin, 3 bee, 5 The code I wrote so ...
0 votes
1 answer
651 views

Show image on solr search result page

I want to show image in my solr search result page. For that, I have created one field in my content type called media. In db, Images are saving in field_data_field_media table in the form of ...
1 vote
1 answer
523 views

How to update the search title and page title depending on facet options

I am using Search Api Views module to list some publications. User can filter them using facets. For example he can look for publications only in Kenya. I want to update the title of my page (view) ...
0 votes
1 answer
494 views

How to change operator in schema.xml and configure site for AND search

I am using Solr search with drupal.Its working fine on my site but the problem is i needed the search to be a specific to the searched content. If i searched for "assembly and key",the search result ...
0 votes
1 answer
380 views

Add custom operator for condition() in search_api

I am trying to implement hook_search_api_multi_query_alter but it seems 'IN' operator does not work here. I have to check condition on array. Any pointers for start building custom operator. function ...
2 votes
1 answer
584 views

Facet - default value with search api

I am using content type in Facet. The search result will be having an option to choose the content type to filter the result. I want the search should show the result with particular content-type ...
3 votes
1 answer
605 views

No search results display when using core search

I have added Drupal the search module block and it displays the search form. When I type and click on search button, it displays nothing, just a refresh in page only. What do I need to do to get ...
0 votes
1 answer
520 views

How to change path of taxonomy facet

I am using facet search on my site. The search paths for taxonomy term facets are of the pattern "search/term-name", but I would like them to be of the pattern "search/term-tid". Is this possible? ...
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 ...
0 votes
1 answer
763 views

How do I avoid behaviors are invoked after an AJAX call?

I have a search result page, with the first set of data being fetched during the page load, and we add a Load More button. Clicking on this button fires an AJAX call, using the ajax_links_api module. ...
6 votes
1 answer
1k views

Apache Solr Search show only currrent user language

I'm using Apache Solr Search Integration to do the searching on our website, works great except i get results for all the language on the site instead of only the one the user is currently using. Is ...
0 votes
1 answer
572 views

Can Apache Solr Search allow a user to search 'within' current results?

I'm looking for a way to allow a user to search 'within' current Solr search results (not search api solr results). Is there existing functionality that provides this? If I need to implement a ...
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 ...
1 vote
2 answers
2k views

Can I Search an entity reference with search api db?

I am using the search api database backend together with a views (with exposed fulltext search field). I want to show a 'related field' that is related to a content type that is being indexed. When ...
2 votes
1 answer
2k views

How to expose filter for entity reference as dropdown in the Search API view?

In my Search API view, I'd like an Exposed filter > Entity reference to be a select box, not a text field. Details I have a view which I created like: Views > Add new view > Show: default node ...
0 votes
1 answer
383 views

add Solr search box in views filter

I have succesfully installed solr and it is working fine, but my main search in my drupal site is based on views exposed filters, is there a way to add the solr search in views filters, so it ...
0 votes
1 answer
975 views

How can I check the value of an aggregated field without direct access to Solr?

I'm using Search API Solr on Pantheon (which means I don't have direct access to the Solr backend), and I've set up an aggregated field in the UI. This aggregated field is a Fulltext aggregation of a ...
0 votes
1 answer
530 views

Showing title keyword in autocomplete

I have just installed search auto complete module,its working fine,but the problem is its showing title before every result like: title: Drupal 7.9 Release tile:Understanding Drupal Here Drupal 7.9 ...
2 votes
1 answer
636 views

How to create a views page of discounted products list?

I'am using commerce discount module in commerce kickstart 2.11 And need to create a page with a list of dicounted products using views filter and/or search API. I've tryed without any success. Please ...
0 votes
2 answers
834 views

Adding CCK field to solr index

We have a cck field called "keywords". We need to add this field to the solr index so we can search on it from outside of drupal. How are CCK fields managed in the solr index? UPDATE: I created a ...
3 votes
2 answers
816 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 ...
1 vote
1 answer
508 views

Does Apachr Solr use Taxonomy or CCK fields for faceted search?

I'm trying to put together a simple faceted search block using Solr. Search with Solr works, but I'm unsure of what's required for creating a block of search properties for faceted search. For ...
0 votes
3 answers
4k views

How to modify the search index?

There's a search index for the Apache Solr module. However, I don't see any way to change this index. It seems that various fields and items are added to the index without rhyme or reason. If I ...
0 votes
3 answers
440 views

How to get searched item value in search form?

How do I get the value of searched item value, if I searched for "cat" in a search box then it also displays on a search page?
1 vote
1 answer
1k views

Pagination in search results

I have installed search configuration module to alter pagination on search results. I've set the pager limit in Configuration > Search settings > ADDITIONAL NODE SEARCH CONFIGURATION > RESULTS to 3 (...
3 votes
1 answer
2k views

Adding indexed field to Search API query in code

I want to add an indexed field to a Search API query in code. My query currently looks like this: $index = search_api_index_load("default_node_index"); $query=new SearchApiQuery($index); $query->...
2 votes
3 answers
7k views

How to improve search results filtering on taxonomy

I would like to know the best way to filter drupal search results using taxonomy. I want users to be able to search for particular results from a particular taxonomy..this can be done to refine ...
1 vote
2 answers
822 views

Problems with Search API and Entity Translation

I'm building a two-language website (Ukrainian - main, English - second) with the new Entity Translation approach. This approach seems very promising however it does not support multilingual content ...
4 votes
3 answers
4k views

Don't index certain content types

I only want to have certain content types indexed, for the default Drupal 7 search. And I would like to do this without installing any other modules. I would like to do this by hooking into the query ...
1 vote
1 answer
2k views

Solr index fields not showing a field

I have a field within a field collection that I need indexed. It's not showing up in the /admin/config/search/search_api/index/solr_node_index/fields page. I tried using this to try to add it myself, ...
1 vote
1 answer
2k views

Search API and Facets API with multilingual taxonomy

I have some taxonomy terms and the settings look like this. All these terms have been translated. After indexing the content with Search API and Facets API, the facets are not shown with translation....

1
2 3 4 5
39