Questions tagged [search]
Use it for the Drupal core module or any module extending its functionality, or aiming to replace it.
129 questions
4
votes
1
answer
4k
views
Views Search Ignoring Custom Node Access permissions
I have a hook_node_access function that denies users view access to a page node if the node has a certain tag and they are not an authenticated user.
This is working fine for viewing the page ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
4
votes
1
answer
4k
views
Views (Search API): Search taxonomy parent and display all children
Problem
I have a country taxonomy field. The top level is continents then below that countries:
Asia
--China
--Thailand
Europe
--France
--Germany
I'm using search API (with solr backend) to index.
...
4
votes
1
answer
4k
views
showing an image field from solr index on custom solr search page
I use the Apache Solr Views module to create a View that displays only items from a specific content type.
I would like to include an image as well on the view. I managed to get the images on my site ...
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 ...
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 ...
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
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?
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 ...
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 ...
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
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 ...
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 ...
4
votes
5
answers
7k
views
I have no fields available for sorting with Search API sorts module
This question is similar to another question I had, but now in a different context. My previous question was: Search text box for Search API + Database + Search Views + Facets API + Facets Bonus
...
4
votes
5
answers
6k
views
How to return a View's content in search results?
We have a page display of a view that contains two or more nodes, but when searching for a keyword that would pertain to those nodes, only links to the individual nodes are returned. What we really ...
4
votes
3
answers
3k
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 ...
3
votes
2
answers
856
views
How can I modify the advanced search form when my hook runs too early?
I'm using hook_form_FORM_ID_alter to modify the content of the form on the search page — I want to remove the "phrase" and "not" fields, and restrict the "only of the types" checkboxes to a hand ...
3
votes
2
answers
8k
views
Searching on Taxonomy terms with the Search API module?
I've been playing around with the Search API module for a little bit now, and it seems to be working fairly well, but I can't figure out how or why I am not able to search on terms even though they ...
3
votes
2
answers
700
views
Easiest way to add x-webkit-speech to the search block's input element
I am creating a zen sub theme and I was wondering what't the quickest way to add the x-webkit-speech attribute to the search box so user's can search with their voice? I know there is a Drupal project ...
2
votes
1
answer
6k
views
How to theme the page template for search results
I want to change the page template when displaying search results. This seems straigh forward when dealing with a content type, but what is the content type for "search results".
E.g. I'll like to ...
2
votes
1
answer
785
views
search results in JSON format
I have a website built on drupal with search functionality. When I search for example for "test" the link of the search is displayed like search/node/test
Is there any possibility that if I call ...
2
votes
1
answer
2k
views
How to bulk re-index the whole site for core search?
I have a website that has about 100,000 nodes.
In the core search page (admin/config/search/settings) it shows that:
There are 80801 items left to index.
It index 100 (or at most 500) nodes per cron ...
2
votes
1
answer
177
views
How to allow user to use one exposed filter and select between two views
I am using the search_api module with views as the back-end. Users will have the ability to search through two different kinds of content, and there will be two separate views (one for each content ...
2
votes
1
answer
227
views
How can I search in another language?
I have 2 languages in my site and a search view for property search
and I am using the Search API module.
When I try to search in English (default language), the search is working.
But when I try to ...
1
vote
1
answer
2k
views
Search results: order & group by custom field
I customized the display of my search results so I can show custom fields in the search results (other question).
I have a custom field ('Department'). I want to show the search results grouped and ...
1
vote
2
answers
3k
views
Drupal 7 img src path issue
I created a block, in which an img with src="sites/mysite/files/imagename". It works every node, but failed loading in search page.
Is this an issue of Search module?
Drupal 7, I hope, has a uniform ...
1
vote
1
answer
2k
views
Indexing custom entity types
I have two custom content entity types that I've created with a module. Neither one of these content entity types extends Node.
Our site has a search bar, and we want to include these two custom ...
1
vote
1
answer
1k
views
return other indexed fields using SearchApiQuery($index)
I created an index that indexes taxonomy terms.
I indexed the term name + field_skill type text.
The current result shows only the term id + score.
I want to show also the field_skill.
$term = '...
0
votes
1
answer
44
views
Drupal search - 2 search pages using their own settings
I would like to have 2 pages:
- http://domain.com/search-1
- http://domain.com/search-2
Where search-1 is limited to results of contenttype blog and search-2 is limited to results of contenttype news....
0
votes
1
answer
167
views
Search on specific content
Hi is it possible to make a search box which are searching only for some specific content.
it should be a search box that should look at titel, ingrediensliste, body, and who have made it.
-1
votes
2
answers
3k
views
Greater control of search results using $snippet
In *node--content_type.tpl.php* I can do the following:
hide($content['body']);
print render($content);
Can I draw and hide field elements from a node's content in a similar way from $snippet; on ...
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 ...
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 ...
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 ...
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
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="...
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 ...
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
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 ...
5
votes
5
answers
2k
views
How to have a combined search view that shows both users and content on search terms?
I've looked at multiple modules (Faceted Search, Custom Search, an abandoned project named search_all) but I haven't been able to find anything that works with 7.x.
What I'm looking for is just a way ...
5
votes
6
answers
5k
views
Apache Solr integration on shared hosting with cpanel
If I do not have any other access to my site's remote server other than file manager via CPanel, is there a way I can get Apache Solr up and running on my Drupal 7 site? The remote host does not ...
5
votes
1
answer
578
views
Integrate Radioactivity with Apache Solr (sort by popularity)
Has anyone integrated integrated Radioactivity with Apache Solr?
I'm using the apachesolr module for search and would like to add the ability to sort by popularity. The Radioactivity module assigns ...
4
votes
3
answers
2k
views
Building a search View that respects access control
I'm implementing search on a site using taxonomy access control with search api and search api solr. Reading the help page node access section, I see:
Needs details on how to build a View that ...
4
votes
2
answers
7k
views
How to add custom fields in Apache Solr's search result?
I'm trying to add some custom fields(image field, text field) in Apache Solr's search result.
I ended up found the code below; however, I don't know:
Where to put this code (is it template.php?)
How ...