Questions tagged [search]
Use it for the Drupal core module or any module extending its functionality, or aiming to replace it.
1,969 questions
41
votes
3
answers
56k
views
How do I customize the search result page?
I have customized the teaser view of my content types and the page view. Now I need to use the teaser view for the search results page. By default, Drupal displays a full text jumbled mess for each ...
33
votes
3
answers
13k
views
Search API vs. Apache Solr Search
I have been using the Apache Solr Search module in Drupal 6 and am looking at the Search API for a Drupal 7 install. I have seen some discussion here but I am looking for any reasons for choosing one ...
29
votes
2
answers
9k
views
Programmatical use of Search API
Problem: Need to run my own searches programmatically with Search API. Every google result I find is geared toward teaching non-developers how to use the module with Views with no results on doing it ...
22
votes
5
answers
10k
views
Search only for the currently active language
How can I restrict the results from a default search in Drupal 7, to bring only the nodes that are in the current language?
My website has a three language switcher; the user chooses what language he ...
21
votes
1
answer
4k
views
How to get taxonomy synonyms working robustly with Search API?
Tag synonyms are a popular, important feature in many sites (used here on StackExchange, for example), and taxonomy synonyms used to be part of Drupal 6's core Taxonomy module, before being dropped in ...
18
votes
4
answers
7k
views
How to combine views exposed filter with search?
My client asked me for a single field, that would work 2 ways:
Autocomplete filter based on taxonomy.
If site visitor inputs something that's not in taxonomy, full text search should be performed on ...
17
votes
3
answers
29k
views
Views exposed filter to search multiple fields [duplicate]
To my knowledge there hasn't been an option in drupal 7 to create a single exposed filter in a view which searches multiple fields, while in previous versions there existed modules to do just that.
...
16
votes
6
answers
9k
views
How can I get more than 10 search results on one page?
By default search page shows only 10 results. How can I change it to display unlimited number of results?
15
votes
4
answers
21k
views
Restrict Drupal Search to few content types
I am having drupal 7 site with search enabled. I want to restrict the search to a particular content type/types, by excluding which types i dont want to appear in the result. How can i do this?
And ...
14
votes
1
answer
12k
views
How to make search on all fields (title and tags as well as body)? [closed]
The built in search engine in Drupal 7 doesn't search on the title or tags fields, just on the body of the node. I need to be able to search on all fields.
What is the best module to install for this ...
14
votes
4
answers
7k
views
Apache Solr 4.6.0 installation and compatibility with Drupal7
I'm having difficulties installing Apache Solr. The latest version that I downloaded was 4.6.0. But all Drupal documentation and tutorials (see http://www.youtube.com/watch?v=ori-VvvH1Aw) are talking ...
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?
12
votes
8
answers
7k
views
How can I change the Apache Solr search URL?
How can I change the default Apache Solr URL path from "search/apachesolr_search/term" to something else?
12
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 ...
11
votes
4
answers
9k
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 ...
9
votes
3
answers
14k
views
Programatically use search api
I want to do something like this
$index = search_api_index_load("node_index");
$myQuery=new SearchApiQuery($index);
$myQuery->condition('type', 'blog', '=');
$data=$myQuery->...
9
votes
1
answer
12k
views
What are the advantages of using Apache Solr over the core search module?
The Apache Solr Search Integration module project page states:
Solr search can be used as a replacement for core content search and
boasts both extra features and better performance.
What ...
9
votes
1
answer
206
views
Drupal 6 Search module double ID's [closed]
I'm currently busy with a website for a costumer. This website has to be W3C validated. There was a problem on the search page of the site with a double ID:
<div class="form-item" id="edit-keys-...
9
votes
3
answers
6k
views
Does Drupal have an AJAX solution for search results, preferably with Apachesolr integration?
Specifically, I'm referring to being able to have the top 5 search results display as options in a drop down menu while the user types in a search query, somewhat similar to how node reference ...
9
votes
3
answers
11k
views
How to get Drupal 7 to search attached PDF and Word documents
From what I have read it seems like you have to use Solr to have PDF and Word attachments indexed and returned in a search. I have Solr working with Drupal but I think I need Tika working on Solr in ...
8
votes
3
answers
11k
views
Integrating Search API and Views?
I just today decided to try out using Search API instead of just the regular exposed filters within views. However, even with the Search API Views module enabled, my indexes don't appear to be exposed ...
8
votes
8
answers
13k
views
How to replace the search submit button with a Font Awesome character?
I would like to replace the search submit button with a Font Awesome character like the Magnifier (Search Icon) character, and put Search the site inside the search box.
How can I achieve something ...
8
votes
4
answers
5k
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 ...
8
votes
2
answers
2k
views
Is the Search API module able to do range facets on numeric values?
I'm using Drupal Commerce, Search API, and Facets API; I'd like to put the product prices as a facet. Configuring my search API index, I managed to get this facet, but the Search API module doesn't ...
7
votes
4
answers
18k
views
How to send a custom Solr Query using Search API Solr
I'd like to send custom solr query (preferably in hook_init) using Search API Solr to a specific URL.
Something like:
function hook_init() {
$url = "admin/luke?show=schema";
$solr = new ...
7
votes
5
answers
13k
views
how to overwrite the search box?
<div class="fr_search">
<form action="/" accept-charset="UTF-8" method="post" id="search-theme-form">
<input name="search_theme_form" id="edit-search-theme-form-1" size="...
7
votes
3
answers
6k
views
How to customize the default search block form template?
How can I customize the default search block form template, I now use below template to display a search form block, but this code doesn't allow me to edit and customize each part of this form ...
7
votes
2
answers
10k
views
Remove a content type from search results
How do I go about removing a content type such as webforms from the site search results?
7
votes
1
answer
3k
views
Search API Panels Display and Contexts
I am trying to build a page with Search API and Panels. I have created my search views with contexts, but I am unable to view any facets in my panel page.
My facets show up in regular blocks, but ...
7
votes
3
answers
5k
views
Apache Solr Facet
I need to create some custom facets/custom filters for my search. I have Facet API installed; has anyone any experience with this? Ideally, I would use Apache Solr Facet Builder, but this only seems ...
7
votes
3
answers
4k
views
How can I search for a specific user on the People administration page?
I can filter by Role, Permission and status on the people page, is there an easy way to search for one specific user?
7
votes
4
answers
7k
views
Drupal 7 Faceted Search: Always show Facets
I have a faceted search working that uses searchapi, facetapi, and entityapi. I was not the one who developed this, but I have some experience with Drupal. As of now the navigation uses links for ...
7
votes
2
answers
3k
views
Inserting search terms into a search input in Drupal 7
When using Drupal 7, how do I print the current search terms into a search form in a block?
In Drupal 6, I used something like this in my template.php:
$vars['search_keys'] = search_get_keys();
...
7
votes
3
answers
4k
views
How do you change the default sort in apachesolr?
I've been trying to get this figured out for a couple days now, and I feel like I'm close, but as of yet no cigar. I need to make the apache solr search on the site I'm working on to have two sorts, '...
7
votes
1
answer
2k
views
Facet API and Entity Reference Autocomplete
I have two content types, with Drupal 7 :
City
Job Offer, with an Entity Reference CCK field named "City" that accept Node Entities of Type City.
I am also using the apachesolr module, with Facet ...
6
votes
2
answers
4k
views
How do I create a "More like this" block?
Is there a way to create a "More like this" block with the Views, and the Search API Solr modules?
I saw this, but it doesn't work.
6
votes
4
answers
3k
views
Remove search form from search results page
I have a search box in a sidebar and I'm happy with it. I don't want Drupal to output another one on the results page. So far I've managed to remove it with the following code
function ...
6
votes
2
answers
12k
views
Remove or hide the submit button on search block in Drupal 7
I need to do some custom theming on the search block in Drupal 7.
Specifically, I need to add a class to the submit button that makes it invisible and removes it from the content flow. So:
<div ...
6
votes
5
answers
13k
views
Search api solr: The Solr server could not be reached
I've got a working solr server, however my drupal always fails to connect, what am I doing wrong?
When adding my server and clicking on the solr server url it takes me to my server (so my path is ...
6
votes
2
answers
8k
views
How to remove core search index?
I' switching core search to SOLR. The core search module still needs to be enabled for SOLR to work. How to I remove the (rather large) core search index?
The "search settings / clear index" option ...
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 ...
6
votes
4
answers
3k
views
How to find bad PHP node that makes search_cron fail?
I can't run cron, manually or automatically. I installed Cron Debug module, checked all modules, and found out that the Search module makes cron stuck. When I disable it, cron is working.
I suppose ...
6
votes
5
answers
4k
views
How to determine if the current page is a search results page?
How can I determine from within a module or theme if the current page is an Apache solr search results page?
6
votes
1
answer
4k
views
How can I show parent and child terms in facet search filter block for a taxonomy field having simple hierarchial select as widget type
I am using facet filter to filter views values . I have a taxonomy term using widget type [Simple Hierarchial Select][1] . I want to be able to filter parent and child terms both in facet filter ...
6
votes
5
answers
2k
views
How to display cck node fields' values at the search result page?
I need to display some specific cck fields such as Telephone Number, Address, etc. at the search result page.
As I see the search-result.tpl.php, there is no $node->... So how can I get the node ...
6
votes
2
answers
7k
views
Changing URL alias for search module action
I'm struggling to make the Search module recognize the presence of a URL alias that I created for 'search/node'. It however stubbornly uses the default path.
In my template I use something like:
...
6
votes
1
answer
1k
views
How do i change the apachesolr index environment based on node values?
I have two apachesolr environment setup in my drupal instance. I want to index some nodes to one environment and some to the other, say based on some node values.
I could see that it always indexes ...
6
votes
1
answer
847
views
Will the Search API increase performance of searches in the Views Exposed filter?
How to increase the performance, if one of the main activities on a website would be searching in Views exposed filters? Will the Search API module (with Database Search/not Solr) significantly ...
6
votes
1
answer
553
views
Language selector for Apache Solr search form
How can I do something like this with Apache Solr in Drupal 7?
This will be the front page of my site, and depending on the language the user chooses, he will be redirected to the language-specific ...
5
votes
4
answers
3k
views
Search results only for the current language
I have a site with 4 languages and am using the builtin search to look for content on the site. How is it possible to restrict the search results only to the currently selected language?
I tried ...