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
865 views

'“entity_test” entity type does not exist' on attempted module uninstall

I'm in the process of replacing D8's core Search module with Search API. When I try uninstalling Search, I get this error: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "...
-1
votes
2answers
2k views

Show total search result count

I'm trying to display the number of total search results on my search results page, using the core search module. I've tried manipulating item-list.html.twig and item-list--search-results.html.twig by ...
2
votes
3answers
1k views

Using search api programatically

I have read and tried https://www.drupal.org/docs/8/modules/search-api/developer-documentation/executing-a-search-in-code I am using drupal 8 and using the default content index for testing. I am ...
-1
votes
1answer
154 views

Configuring Solr/Sarnia Fulltext Search in views

I am pulling in content from a Solr server using the Sarnia module, and displaying it using views. If no keyword is entered into the views fulltext filter all results are displayed, but for some ...
0
votes
1answer
1k views

How to index Drupal Commerce 2 products for the search?

The products in Drupal Commerce 2 could not be found through Drupal's default search form. Modules like Commerce Search are available only for Drupal 7. How can I index product titles or SKUs and ...
1
vote
1answer
281 views

Full phrase search

Now I'm using "Search_api" module and when I input, for example, "test case" - it's output all articles which consists both of this words separately. But I want to make search with exact phrase "test ...
7
votes
3answers
3k views

How To Force Search API To Reindex a Node / an Entity

I'm working on Sear API. My entity has many items and data change by action of the user. I don't want to reindex all items of data. So I want to reindex an entity after user does the action. I found ...
0
votes
0answers
306 views

How do I remove core search index?

I want to remove the core search index. In Drupal 7 I achieved this by adding the following line to the settings.php file. $conf['search_cron_limit'] = '0'; What is the equivalent for Drupal 8?
0
votes
1answer
116 views

How do I programmatically add a new search page to the search page list?

I have been able to successfully create a search plugin for a custom module, which allows users to search for my custom entity by name. After creating this file, I have to enable it by visiting /admin/...
0
votes
1answer
737 views

Allow special characters in the Search Form

I can't search with any special character in the default search block form or in search API. Commonly used word like B&W (black and white) don't seem indexed up well, probably due to some encoding ...
1
vote
0answers
76 views

Add anchor to view exposed filters

I'm working on a site at the moment that has exposed filters for a search view using the Facet API. When a facet is selected it reloads the view with a GET parameter appended like in /recipes?f[0]=...
0
votes
1answer
214 views

Drupal 7 Custom Search Result Page

I am trying to create a custom page that display my resuslts which I receive after I search for a post. I am having no luck, I am a total begginer in drupal 7, I googled and looked around here but I ...
2
votes
2answers
2k views

Search api excerpt are empty in the result

I have installed search api module in drupal 8 and included excerpt in the search result. But excerpt are always empty in the search result. (HTML div element is there but no content inside) I ...
0
votes
1answer
385 views

Elasticsearch-Connector: can't index with Search-API

Im using latest Drupal 8.x with Search-API 8.x-1.5 und Elasticsearch_Connector 8.x-5.0alpha1. I can add a cluster and via Search API I can also connect to the Elasticsearch Server. But when I try to ...
1
vote
0answers
26 views

Search result from two websites

I have two websites with different database in a same server. I want to implement a search function that can search the two databases/websites and show the results in one site. Is it possible to do in ...
0
votes
1answer
14 views

Search results showing nodes which are already under NODE_ACCESS_DENY

In Drupal 7, I have some nodes that are restricted access for anonymous user. I implemented this using hook_node_access where if the user_is_anonymous and if the operation is View, I am giving ...
0
votes
1answer
179 views

What are the differences between Search API/Views and regular Views? [closed]

What are the differences between setting up Search API (with the Search Views module) and creating a particular set of results with Search Views against using Views is the normal manor? The big ...
3
votes
0answers
287 views

How to make title exact match appear first in search API

For example, I have content A with : title = Quick brown fox jumps body = (empty) and then I have many other content with word 'quick', 'brown', 'fox', and 'jumps' all accross the body field. I ...
0
votes
1answer
318 views

Having fatal error when rendering search block in page.html.twig [duplicate]

I'm using Bootstrap theme on Drupal 8. How can I print the default search block form in page.html.twig? Nov 22,17 @9am Update my question for @No Sssweat and @Ramdas Gaikar I have tired this before ...
0
votes
0answers
41 views

Number as letter search and vice versa

I'm looking at creating a private number / license plate application and wondered what the best tools were for the search aspect of it. I would like the search to have the ability to have the letter ...
1
vote
1answer
297 views

Indexing image url in search api drupal 8

How to index the absolute image url instead of image uri in search api drupal 8. Image field formatter renders the image url but there is no option to index the url part.
1
vote
2answers
2k views

How to create a Search API block?

I have a search view based on "Search API", I want to replace the default search block of the drupal core with a block "Search API". 1) How to modify the search block of the heart so that it uses ...
0
votes
1answer
27 views

How to index field as single value?

I use Search API, Search API Database and FacetAPIto create custom search. And there are mistakes in facets when it displays field with hyphens. For example, there is a text field "city" with value of ...
1
vote
1answer
95 views

module_invoke to create user search block not working

I've done the following to create two search blocks: $content_search = module_invoke('search', 'block_view', 'content_search'); $user_search = module_invoke('search', 'block_view', 'user_search'); ...
0
votes
0answers
37 views

How to clear search API textfield after each search

I am using Drupal 8 with the Search API module. Everything works as expected but the search terms remains in the search textfield after every search. This makes using the search function a bad user ...
1
vote
1answer
336 views

Not able to alter field value/s using hook_views_pre_render or views api hook functions

I have a search result page created using search api and views. My search result page is based on this tutorial and it seems to work properly,however I need to tweak some field's output value and I ...
2
votes
3answers
917 views

How to create a Search API search box that redirects you to the search page

I am using Drupal 8 and the Search API. I have created a search page using the API and views (basically modified the view that came prebuilt when you install the search API). Everything works as ...
-1
votes
1answer
16 views

What kind of index to create for solr search?

I have got a solr instance up and running locally on my drupal 7 server. I have added the server to the search config on my drupal site and now I'm trying to create the 'index' part of the search ...
0
votes
1answer
96 views

Search_api not searching taxonomy names

I feel like I have tried messing with every setting I can find but I simple cannot make my search_api search view return any results based on taxonomy names. I want to be able to search based on a ...
0
votes
1answer
51 views

Apply multiple Content Type filters to Search Block Form in hook_form_alter()

I'm trying to figure out how to apply multiple content type filters to the search results of the Search Block Form (not the normal search form). I've successfully filtered by current language and ONE ...
0
votes
1answer
248 views

Stemmer processor not working

I have configured Search api module in my Drupal 8 search. This is the first time I am configuring search api. I am using database search and not solr. My problem is stemmer processor is not working ...
0
votes
1answer
44 views

How to change the default search button value in awesome zymphonies free theme?

please have a look at the site, http://35.187.238.51/jrdtml/. This is a prototype site of the library I'm working for. I'm using Drupal 8.4 with Awesome Zymphonies free theme. I would want to change ...
0
votes
1answer
352 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
2answers
540 views

Remove search form from search result page in Drupal 8

What's the best way to remove the search form from the search result page in Drupal 8?
0
votes
1answer
46 views

How to remove “Submitted By” data from google search engines in drupal7?

How can I prevent showing of Submitted by username information on google search result pages. I looked into some of the answers but I am not sure those solutions will remove from google search. I am ...
0
votes
1answer
42 views

Token replacement by its value before indexing in apachesolr

I'm using solr 4-x (apachesolr) for search functionality in my Drupal 7 site. I'm using a token in some long text fields in some nodes of different content types across my site. Lets suppose the token ...
2
votes
1answer
436 views

Implement a reset button per facet

I'm using Search API with Facets and a view to display the results. Everything works as expected but I would like to have a reset button per facet, that could be used as a "Show all" button. For the ...
1
vote
1answer
140 views

Search API: sorting with Scandinavian alphabet

We're using the search API something like this, and returning results in alphabetical order: // Set up $search_api_index = $this->entityTypeManager->getStorage('search_api_index'); $index = $...
1
vote
0answers
106 views

What is “Keyword relevance” in Search setting in Drupal 7

Can anyone please explain me what is the "Keyword relevance" in search setting and what is does.? i followed many websites but i could not understand this.
-1
votes
1answer
286 views

Solr, Merge Facet from two taxonomy type fields

I am trying to create an advanced facet from a solr implementation. A searchable content type (Book) has 2 fields (grade level min) and (grade level max) Grade level is a (Taxonomy Term) Pre-K - 12th....
0
votes
1answer
350 views

How to create relevant keyword search using drupal 7 views

We have created one drupal views and fetching the content from one content type. created exposed filter by two field (title,body) using contextual filter. Search is working fine for exact match ...
0
votes
1answer
299 views

Search API: Custom processor not hitting addFieldValues [closed]

I'm creating a custom module for adding a processor that adds relative entities. Here's my code for getPropertyDefinition. public function getPropertyDefinitions(DatasourceInterface $datasource = ...
0
votes
1answer
121 views

Search facets by title vs node id

I have Search API, Search API Solr and Facets setup in drupal 8. The view settings used as data source for the facet is as below. There are two content types: Language and Role. Both are used as ...
-1
votes
1answer
42 views

What does “apachesolr_access_node_ignore = 1” mean?

What does apachesolr_access_node_ignore => 1 mean? Does it affect the search, when apachesolr_access_node_ignore is set to 1?
0
votes
1answer
36 views

how to show teaser view of my content types in search result page in drupal 7

I have customize my teaser view of my content types. Now i want to show that teaser view in search result page also. How can i do this? If anyone can give me a example with code will great help.
0
votes
1answer
108 views

How can I configure the search engine to search by dates? Drupal 7

I am new using drupal and I am creating a website for renting various items. I need the searcher to give me as a result the available articles between 2 dates, that is, the user searches for items ...
1
vote
1answer
37 views

How do I fetch user profile data in search api entity (node) view?

I've one search api index view of node type. Then each user have profile. So I wanted to fetch profile data of that entity created user. In normal view it can be easily done with relationship. But in ...
3
votes
1answer
2k views

Why can't I connect to my Solr server?

I am attempting to configure Solr search with a drupal web page on a dev server. I have installed the server and the Search_API_Solr modules along with it's dependencies. When I try to connect the ...
1
vote
1answer
256 views

How can I get additional fields from Search API query?

I have Search API DB backend where I will be retrieving thousands of results and I need some fields to get out of there as well, beside search item id, since doing additional query to MySQL with IN ...
-1
votes
1answer
209 views

Compare views.total_rows in twig file [closed]

Original Code: <div class="our-story search-query"> <div class="container"> <h1>Search Results</h1> {% if keysearch %} <p>{{ view.total_rows }} results found ...