Questions tagged [search]

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

731 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10 votes
0 answers
1k 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 ...
user avatar
  • 1,612
5 votes
1 answer
132 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 ...
user avatar
4 votes
1 answer
2k 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 ...
user avatar
  • 1,064
4 votes
0 answers
2k 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" ...
user avatar
  • 61
4 votes
1 answer
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 ...
user avatar
  • 301
3 votes
1 answer
62 views

How to get all search results of search api index?

I want to get all the search results from the search API index and then perform a custom sort on it and then display them accordingly. I used the hook_search_api_results_alter and also the search ...
user avatar
  • 2,699
3 votes
0 answers
257 views

Search Api Solr view cannot retrieve node. ID incorrect?

Drupal Core 8.7.8 Search API 8.x-1.14 Search API Solr 8.x-3.7 Solr 8.1 Solarium 5.1.4 The current Solr config is exported and loaded in Solr. Indexing from Drupal works. The Solr Index View shows ...
user avatar
  • 1,207
3 votes
0 answers
518 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 use ...
user avatar
  • 254
3 votes
0 answers
6k 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 ...
user avatar
  • 4,514
3 votes
1 answer
2k views

How can I display a paragraph field excerpt in a search result view?

I've spent all day and night battling with Search API (with and without Apache Solr) in Drupal 8. Does anyone know if you can use Search API to index paragraph content and then in a search views ...
user avatar
  • 31
3 votes
0 answers
117 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 ...
user avatar
  • 1,191
3 votes
0 answers
940 views

How to generate an excerpt for a specific field in Search API Solr?

I created a custom query that displays publications based on keywords entered by user. The query looks into "title", "body" and "author title"(node reference) fields. if(empty($keywords)!=1){ ...
user avatar
  • 672
3 votes
0 answers
467 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 ...
user avatar
3 votes
0 answers
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: ...
user avatar
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->...
user avatar
  • 6,317
3 votes
2 answers
317 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 ...
user avatar
  • 143
3 votes
1 answer
283 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" ...
user avatar
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?
user avatar
  • 414
3 votes
0 answers
322 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 ...
user avatar
3 votes
1 answer
601 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 ...
user avatar
  • 31
3 votes
0 answers
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 ...
user avatar
  • 1,161
3 votes
0 answers
727 views

Block with search box in header

I need to create a block with a search box in header in order to allow users to search for a the specific content type that is shown in that block, but I don't know how to do this. I've attached one ...
user avatar
  • 379
3 votes
2 answers
341 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%...
user avatar
3 votes
1 answer
416 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). ...
user avatar
3 votes
1 answer
370 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 ...
user avatar
2 votes
0 answers
51 views

Search API fulltext search that includes entity reference fields in the 'search index' display mode: Is this the correct configuration?

To get entity reference field values (not IDs) to work in full text search, is it necessary to add each entity reference field's "name" to the index as a separate field of the fulltext type? ...
user avatar
  • 117
2 votes
0 answers
29 views

Shared Facet between Taxonomy and Content Field

My search page needs to show results from both content types and taxonomies. Both the content type and taxonomies that I am searching on have a field called training_location. The training_location ...
user avatar
  • 181
2 votes
1 answer
455 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 ...
user avatar
  • 343
2 votes
0 answers
41 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 ...
user avatar
  • 39
2 votes
2 answers
313 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 ...
user avatar
2 votes
0 answers
301 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 ...
user avatar
2 votes
0 answers
900 views

Alphabetical sort of Search API results including multiple entity types

On my Drupal 8 site, I am configuring a Search API search bar that uses a Search API Page that I've configured to include 3 entity types (Content, as well as 2 custom entities I have built). The ...
user avatar
  • 707
2 votes
0 answers
645 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 ...
user avatar
  • 2,894
2 votes
1 answer
67 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 ...
user avatar
  • 315
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 ...
user avatar
  • 1,159
2 votes
0 answers
31 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 ...
user avatar
2 votes
0 answers
102 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 ...
user avatar
  • 21
2 votes
0 answers
870 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 ...
user avatar
  • 621
2 votes
0 answers
204 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 ...
user avatar
2 votes
0 answers
201 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 ...
user avatar
2 votes
0 answers
306 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 ...
user avatar
  • 41
2 votes
0 answers
323 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 ...
user avatar
2 votes
0 answers
325 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 ...
user avatar
2 votes
0 answers
552 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 ...
user avatar
2 votes
0 answers
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, ...
user avatar
  • 143
2 votes
0 answers
184 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 ...
user avatar
  • 459
2 votes
1 answer
452 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.
user avatar
  • 347
2 votes
0 answers
128 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 ...
user avatar
  • 47
2 votes
0 answers
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-...
user avatar
2 votes
1 answer
840 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 ...
user avatar

1
2 3 4 5
15