Questions tagged as ['search']

Use it for the Drupal core module or any module extending its functionality, or aiming to replace it.
Score: 0
Rainer Feike avatar
Create solr_core for search_api_solr 4.x with docker solr 8
in flag

I used to create my solr instance for drupal like this:

docker run -v $PWD/solrconf:/asdentcore  -e SOLR_JAVA_MEM="-Xms2G -Xmx2G" --restart unless-stopped  -p 8984:8983 -t --name asdentDevSolr -d solr:8.11
docker exec -it --user=solr asdentDevSolr  bin/solr create_core -c asdentcore -d /asdentcore

Where ./solrconf contains the files from modules/contrib/search_api_solr/solr-conf-templates/7.x.

With the n ...

Score: 0
Search API views is displaying empty pages
kr flag

My search page is displaying results. The pager is displaying. But the first 15 pages display no results and then on the 16th page, I can see the content.

I have deleted all the data from the index, and re-index the data again but no effect. Can anyone tell me why the first 15 pages are empty? and how can I fix it?

When I print the results in hook_search_api_results_alter, it is something like th ...

Score: 0
Elber CM avatar
Split taxonomy terms in two facet filters
it flag

English is not my first language, so please be patient.

I'd like to ask for assistance to split my taxonomy terms in two facet filters.


  • Drupal Core v9.2.6
  • Acquia Search v3.0.5
  • Acquia Connector v3.0.4
  • Search API v8.x-1.21
  • Search API Solr v4.2.1
  • Search API Pages v8.x-1.0-beta3
  • Search API Solr Admin v4.2.1
  • Facets v8.x-1.8

I have configured correctly the listed modules and set a functional Search  ...

Score: -3
mt.i.1 avatar
Search and pagination in media popup don't work properly
us flag

In the /admin/content/media page, I have more than one button for the pagination.


The search is working properly.


When I edit a media on some node, in the popup, I only have one button in the pagination.


The search isn't always working. Here, I'm making the search from the page 2, where the image isn't available directly.


It only works when the searched image is on the current page (selected ...

Score: -1
ventura avatar
How do I list all users in a view that have created a node with certain taxonomy terms?
cn flag

The goal is to create a view to list users on a page with url /search/[category]/[topic]/[location] where "category" "topic" and "location" are taxonomy fields in nodes that users can create.

I want to list all users that have a node were the "search" queries apply.

/search/all/all/all should list all users

/search/all/topic1/all should list all users that created at least one node with topic "topic1 ...

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

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?

Background: Using DB backend with multiple content types, each having several entity reference fields for taxonomy terms in different vocabularies.

I included all of these entity reference fields in the "search index" ...

Score: 1
How to create a search api facet for filtering user access
pk flag

I'm trying to figure out how to create a search api facet, that will filter results based on user access. By default, I'm bypassing access check hence showing all the nodes. I need to add a checkbox, which will filter results by access for current user (showing only already purchased items). One approach could be perhaps indexing all accessible nodes per user (about 300 nodes and 4000 users at the momen ...

Score: 0
ACanadianCoder avatar
SOLR displays "submitted by username" only for the Article content type. How do I stop this?
br flag

No matter what I do, I can't seem to remove the Submitted by [username] from popping up in my search results for the Article content type. I'm using the Apache SOLR module. If you visit the article page itself, I never actually display this information, so showing up on the search results page is confusing me.

When I go to manage fields for my search results, I've got the following for content (I  ...

Score: 0
ckojo avatar
Search API - Can't get result items
tm flag

I installed Search API, created Search Index, and it's using the Solr server. When I execute the query and debug the code afterward, I get 3 result counts. And for result items, I get an empty array. When I try the same query in Solr Admin, I get 3 result counts as well as result items.

public function searchResults() {
    $parse_mode = \Drupal::service('plugin.manager.search_api.parse_mode')
Score: 1
Adding a relative date range facet to a Search API view using the "last updated" field
cn flag

I would like to add a facet to a search_api view filtering on the content "changed" field. I would like to use friendly naming like "This week", "This month" etc. There is an answer here stating that custom code is needed. However this answer is for Drupal 6 (about 8 years old) and refers to a date range field while "changed" is a timestamp.

Currently if I add Date processor capability to this facet I h ...

Score: 2
sonfd avatar
How can I index arbitrarily related entity data in a Search API index the same as if it were an entity reference?
in flag

I have a site with three content types:

  • Collection (references a paragraph that references Articles)
  • Article (references Authors)
  • Author

I have listing page displays for each of these content types. The displays have facets based on the above relationships.

  • The Collection listing page has a filter by Author. This relationship is not a direct relationship, rather a chain of references: Collection ...
Score: 1
khadidja avatar
Display multiple values in separate rows with view that uses Search API
cn flag

Yesterday I asked this question, but after realizing the issue was specific to my view relying on an indexed field using the Search API module I wanted to make another post getting more specific help.

So I have a content type, "Person," that uses an entity reference to assign each person a program. I'm trying to make a "People" page for my site that groups the people by said program that they are in ( ...

Score: 4
sonfd avatar
How can I add a boost to a search_api_solr query if a field has a value?
in flag

I'm trying to add a boost to a search api Solr query when a field has a particular value, e.g. when its nid = 123. Looking at Solr version 8.7 docs for boosting (my solr server version), this looks pretty straightforward. I just need to add a bq parameter like:


When I go to my Solr server's admin UI and add a query there - first checking the edismax parser checkbox, and then adding

Score: 3
How to get all search results of search api index?
kr flag

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 results event. My view has a pager to display 10 results at a time.

But the problem is, I am only getting 10 results instead of all because of that pager.

Is there any to get all the results and then perfor ...

Score: 2
Rubix05 avatar
Shared Facet between Taxonomy and Content Field
cn flag

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 field is also a taxonomy with only two options: "Remote" and "In-Person".

Is there a way to merge a facet so that I can filter results for both a content type and taxonomy that has the training_location ...

Score: 0
tonytheferg avatar
How to create a dblog record from a views exposed form submission
cn flag

I am trying to create a log record of searches made though my Search API View exposed form block in Drupal 9.

For some reason on a brand new search I get 2 duplicates (3 total entries), and it seems like I remember reading somewhere that the forms can be submitted multiple times. So I would like to know how I could eliminate that.

Update: here is an issue for Drupal 7 ...

Score: 1
I installed Solr for the Search API Solr can someone can give me hints what i could have done wrong?
br flag

I'm currently running a CentOS 7 server with cPanel and Drupal 8. I installed Solr 8.8.1 and I can access the administratrion page where I an able to create cores. I installed the Search API module with Composer.

When I try to use the Solr server via the Search API module, I get a server connection error.

I tried a lot of Drupal configuration, with Basic Auth and standard, via localhost, IP and domain ...