Questions tagged [search]

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

710 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
670 views

With search_api_solr, how can I apply an significant field based boost when using solr 6.x?

I am using the solr backend for search_api on a drupal 8 site. I have added the value of a taxonomy term reference field (field_promoted_search) to the index. If an item of content has ...
5
votes
1answer
121 views

Programmatically Setting Content Ranking Factors For Drupal Search

I've added a dropdown to Drupal search page interface. I would like for users to be able to select this control to sort results according to Date or Keyword Relevance. I'm able to get the dropdown ...
4
votes
1answer
230 views

Solution for preventing indexing of content types?

I have a custom content type that I simply want to not be indexed by the Drupal search engine. Yes, I can hide it from the search results, but there are hundreds of thousands of these nodes and ...
4
votes
1answer
2k views

Implementing Taxonomy hierarchy in View and Search

I am working on a biology website that needs to make use of Drupal 7's Taxonomy system, for a biological taxonomy. My goal is to allow users to tag all content with related species information, and ...
3
votes
0answers
239 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 ...
3
votes
0answers
186 views

Date filter GRANULARITY for Search API VIEWS

I am working on Search API view. There is a Date Exposed filter. The requirement is we have to filter based on Month-Year instead of Day-Month-Year. But there is no Granularity option to select for ...
3
votes
0answers
760 views

Drupal 8, Paragraphs and search api. No excerpt available with title of node

I've spent all day and night battling with search api (with and without solr) in Drupal 8 Does anyone know if you can use search api to index paragraph content and then in a search views result, get ...
3
votes
0answers
102 views

How to include pages created with Views in a Search API index

I have configured Search API on a site to search all content. It works fine. The only thing I can't work out is how to include pages which are views in the search index. Is the only way to do this to ...
3
votes
0answers
76 views

Custom Storage Fields (Not showing in my index)

namespace Drupal\custom_storage_example\Entity; use Drupal\Core\Entity\ContentEntityBase; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\BaseFieldDefinition; /** * Defines the ...
3
votes
0answers
802 views

How to change the placeholder title of the search box

I created a Drupal 8 website and enabled multilingual modules, so my website is in French, English and Spanish. In the placeholder of the search box the word Search appear for English and is ...
3
votes
0answers
1k views

How do I index custom fields with the search API using elasticsearch?

I see all kinds of tutorials to get apache to index content. Is there any difference in getting elasticsearch to index my new custom field? On the field page I can see my field but when i expand it ...
3
votes
0answers
1k views

Search excerpt with Search API (rendered HTML)

Is it possible to create a search excerpt from the Entity HTML Output (with Search API)? What I did: Activated highlighting and "create excerpt" within my Search index. Added "complete entity view" ...
3
votes
0answers
436 views

How to use location distance / proximity filter with facet search api

I am using location, gmap, facet api modules and I have created search page for node with facet api. I want to use distance / proximity filter for facet search but I didn't get distance / proximity ...
3
votes
0answers
2k views

Customizing the search results page with Apache Solr

I have business requirements to do a total overhaul of the Search Results page for our site. Based on the searching i've done so far, I have a few options to adjust the results pulled by the search: ...
3
votes
1answer
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->...
3
votes
0answers
201 views

Rewrite exposed filter input from url

I have created a view to list nodes path articlesearch. Now i want to filter the content with a search string based on title, body and taxonomy term with OR condition One issue i am facing is i want ...
3
votes
2answers
304 views

Trigger Event After Node Is Indexed

I have a pretty basic Drupal 7 web site with Solr search (works great!). I would now like to perform some "work" after each node is indexed with Solr. First I tried creating a workflow rule but ...
3
votes
1answer
281 views

How to avoid the following errors while adding options for Polls in our site?

We use core drupal's Poll module where admin can add options to the polls by clicking "Add option" & at the same time they can remove the options by clicking "Remove option" Here's our problem, ...
3
votes
2answers
909 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?
3
votes
0answers
314 views

searching on List (integer) field for values greater than than selection (drupal 7)

i'm working on a site for a real estate company which involves a search form. i've got a view set up called search results and have set an exposed form (form in block) with a field to search Number ...
3
votes
1answer
585 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 ...
3
votes
0answers
2k views

Extend Search API: Create and expose custom sort/filter from db_table

I have a geocoded field for each node of a certain type. It simply geocoded the address filled in the node create form. I've multiple views based on the search api (database not solr) and use facets ...
3
votes
2answers
244 views

Search API path make SEO friendly

I am using Search API. I make a view of all the indexed entities and uses Taxonomy term as Contextual Filter. But the path of view is not SEO friendly. The path is like http://www.example.com/en/Real%...
3
votes
1answer
332 views

Solr indexing on custom tables

We are implementing apache solr search in drupal 7.. after installing the module if you run the index, the apache solr is returning results from the drupal tables (nodes,users,taxonomy,content type). ...
3
votes
1answer
301 views

add flag to product display view

I have a product display using facets that I have tried in vain in views to add a flag/unflag link to with views I already built a separate comparison view with the relationship to flag and the ...
2
votes
0answers
20 views

Fine tuning Search API with Solr

After figuring out that tokenizer was breaking up a search phrases into individual keywords and turning that off in the UI, searching for a phrase actually brought the expected page onto the first ...
2
votes
2answers
73 views

Is there a way to add non indexed fields to a search api view?

I’m wondering if it’s possible to add non-indexed fields to a search API indexed view? I want the standard flags fields to be available on the indexed search view. And I was thinking I could do this ...
2
votes
1answer
32 views

Facets rendering on all pages irrespective of value dynamicaaly form contextual filter in views

I m trying to add facets using facets module in drupal 8. i have created listing of all products using views page. on listing page, facets are showing properly as per brand information added from ...
2
votes
0answers
4k views

How do I implement 'fuzzy' search with the Solr search API

Some sources equate 'fuzzy' search with matching partial terms (substrings), others include matching misspellings, also, as being 'fuzzy' search. I want to do both. I have configured partial word ...
2
votes
1answer
724 views

Show parent items in hierarchical facet display

Taxonomy terms are configured as such: Parent category 1 - Child category 1 - Child category 2 Parent category 2 - Child category 3 - Child category 4 "Empty facet behaviour" is set to "Do not ...
2
votes
0answers
402 views

How do I begin to debug an EntityMetadataWrapperException error on searches?

When trying to run a drush cron on a Drupal 7.54 site, I see the following error. $ drush cron WD cron: EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required ...
2
votes
1answer
57 views

Search index stuck at 0%, mysql error on public search, can't clear error

I have just discovered that the Drupal 7 search on my website is giving 'website encountered an unexpected error. Please try again later.' to users who are not logged in. (it's fine for logged in ...
2
votes
1answer
747 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 ...
2
votes
0answers
24 views

“A” at start of node title causes it to not be found w search_api_solr unless “a” added to search string

I'm having a weird issue with string grouping, I was wondering if anyone might have suggestions on what to look at. I'm maintaining a site that has a nodes indexed at HostedApacheSolr. We're using ...
2
votes
0answers
195 views

How to reindex a particular node in Drupal 8?

I want to index particular node on update, insert how to do it in Drupal 8? In drupal 7, we use the function function _node_index_node() I want to use the same function in drupal8 for my Drupal 8 ...
2
votes
0answers
176 views

Index data under Solr from a SOAP web service to expose them via Search API (views)

We have to expose a subset of an external database coming via SOAP. To keep it simple, let's say that we have to handle products, product providers and product categories under Drupal. Products are ...
2
votes
0answers
960 views

How to render a facet block?

I've created a facet block according to this example Programatically render a block in a twig template I've created the facet block as follows: $variables['block_output'] = Drupal::service('plugin....
2
votes
1answer
21 views

Core search, when only one result, open result

Is there a simple way to accomplish the feature in the title ? When a search results in one result, don't show the result but go directly to the node.
2
votes
0answers
216 views

Hook Search Preprocess

I'm trying to manipulate search keywords before submitted for search. Using Search API and Views. Unfortunately, hook_search_preprocess funciton does not work in my custom module. function ...
2
votes
0answers
263 views

$pager_total_items giving wrong results count in custom search module

I am not too sure what happens but in my custom search module, the $GLOBALS['pager_total_items'] count is wrong on the first page. For example, I search for a term and it will display: Showing 1 - 10 ...
2
votes
0answers
278 views

Modify Search Block HTML Output for Zurb Foundation Topbar

I have created a subtheme from the Zurb Foundation base theme for Drupal 7. I am trying to: Add "data-equalizer" and "data-equalizer-watch" to the html output of the core Search Form Block. Change ...
2
votes
0answers
511 views

Search highlighting for body field in Solr Seach API

I am using Search API for Solr and I see that it generates excerpts fine but it only works with Search API page when theme as search results is selected only. I would like to get highlighting to work ...
2
votes
0answers
65 views

How to interpret the components exposed by Facet API in Features?

I'm developing a website in Drupal 7 when there is a content type representing research papers that has, among other things, fields representing the author (different from the Drupal user), keywords, ...
2
votes
0answers
164 views

What's wrong with the autocomplete in the search textbox using apache solr?

I have apache solr version 4.x and Drupal 7.39. I just want to create solr search in Drupal. I have installed Apache Solr Search, Apache Solr Autocomplete (tried both dev version and recommended ...
2
votes
1answer
260 views

Change search results pager to mini pager?

How to change search result's pager to mini pager. I want to change default pager to mini pager in that search result page. Please help me. Thank you.
2
votes
0answers
67 views

Is it possible to search by Realname?

I have the Realname module installed to display the real name of my users in my database rather than the name. ie realname Bob smith however name is bsmith. However the search box only looks for name ...
2
votes
0answers
28 views

Search text field shifts down to new line in Nav block

I enable the search module "core module" and then I place the search block in the Navigation region of my Bootstrap subtheme. In Firefox it renders it correctly. placing it just to the left and in-...
2
votes
1answer
642 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
0answers
25 views

How to show labels of matching fields in a search-api view

I have a view that displays search-api results. Is it possible to include a list of the labels of the fields where a match was found? E.g. when searching for Ford: Henry Ford: Title, Body Fordissimo:...
2
votes
0answers
43 views

Does rules take advantage of search api for fetching nodes?

I have a few rules which fetch nodes. I wonder if performance would increase by creating a proper index.