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
39
votes
3answers
52k 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 ...
4
votes
2answers
2k 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 ...
6
votes
7answers
8k 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 ...
18
votes
4answers
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 ...
6
votes
2answers
3k 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 ...
34
votes
3answers
11k 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
1answer
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
1answer
3k 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 ...
3
votes
1answer
3k 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. ...
14
votes
4answers
6k 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
1answer
11k 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 ...
8
votes
4answers
16k 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 ...
12
votes
8answers
6k 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
4answers
5k 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?
5
votes
2answers
11k 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
3answers
3k 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 ...
2
votes
1answer
3k 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 ...
6
votes
2answers
6k 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 ...
4
votes
5answers
5k 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 ...
2
votes
1answer
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
1answer
160 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 ...
1
vote
1answer
956 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 = '...
4
votes
5answers
6k 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 ...
3
votes
2answers
690 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
2answers
7k 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 ...
2
votes
1answer
732 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
1answer
77 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 ...
2
votes
1answer
2k views

Is it possible to use Apache Solr to search across multiple sites?

I'm completely new to Solr and roughly understand the basic principles of setting up a search engine but not (yet) the specifics. I'm beginning work on a site which will display search results from ...
1
vote
2answers
2k 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
1answer
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
2answers
759 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 ...
0
votes
1answer
128 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.
0
votes
1answer
40 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....
-1
votes
2answers
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 ...
23
votes
5answers
9k 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 ...
4
votes
2answers
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 ...
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 ...
6
votes
2answers
3k 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.
9
votes
3answers
5k 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 ...
5
votes
6answers
4k 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 ...
4
votes
1answer
3k views

Search results - Show custom fields

Is it possible to change the output created with the Search module? I want to show custom fields, and I want to hide the description, user and date...
15
votes
4answers
20k 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 ...
7
votes
5answers
12k 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="...
4
votes
1answer
3k views

How to boost relevance of Search API solr with the value of a certain field?

I am using Search API solr on my site. To get better search results I would like to boost the relevance by the value of a certain numeric field. Say, all items have a field A, which is numeric. Now I ...
4
votes
1answer
721 views

How do I find the search block form ID?

I added some search block in my theme, and I placed each of them in a custom place. I want to edit each of theme by using function hook_form_FORM_ID_alter for this purpose. Provide a form-specific ...
3
votes
2answers
742 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 ...
3
votes
2answers
10k views

how to remove duplicate from views' result page

I went through all solutions found on the web. Both Distinct or Aggregation do not work at all in my case. Is there a way to remove the duplicates using hook_query_alter() ? My sql query run in ...
3
votes
1answer
5k views

How to programmatically fetch the results of a view with facet filtering

Setup Drupal 8.2 + Views + Facets View articles … … with first sub-view page_1 … has facets View filter: field_title View facet: field_facet allows multiple values, e.g. A and B Concept I would ...
3
votes
1answer
4k views

How to set up Apache Solr with facets so that it uses a front page search form?

So I am working on my first mid sized D7 projects and it needs some rather advanced searching capabilities (at least advanced for me). I've installed Solr, created a server and an index with the ...
2
votes
1answer
491 views

Having issues getting solr search facets to appear on non-search pages

I'm using the solr search integration module with facet api on drupal 7 and I'm having issues getting the facets to show on non-search pages. I've checked the box for non-search pages and added a few ...