Closed geerlingguy closed 4 years ago
To get the search excerpts to display, I went to the search index 'Processors' and enabled the 'Highlight' processor (thanks to some advice from this blog post: How to highlight search results in Search API Solr View in Drupal 8).
During the live stream, we got titles to appear, but couldn't get the body text to appear:
After enabling the Highlight processor:
Now, on to theming!
It seems like the disconnect on the live stream came from config not having a password stored; I checked after exporting config again (and re-saving the password), and it showed the password in plain text, e.g.:
@@ -44,7 +44,7 @@ backend_config:
finalize_timeout: 30
commit_within: 1000
username: 'username_here'
- password: ''
+ password: password_here
solr_version: ''
http_method: AUTO
jmx: false
So I opened an issue on Drupal.org Prevent password from being stored in configuration, and we'll see what other people say. I want to keep this codebase open source, but there's no way I can do that if there's a plaintext password that has to be in the exported config so Solr search works!
Ha, I'm working on implementing facets for the search page, and I ran into this old gem on my own YouTube channel: https://www.youtube.com/watch?v=J8Rt6HSzrqY
Haha, how deep the rabbit hole goes; another article I found was Faceted Search in Drupal 8: Using Search API Solr and Facets... and was also by me :P
Search is mostly working now, though I'm not sure why Facets is returning some weird data, should have many more articles from 2016 and beyond here...
I got search working well; a few notes:
Body » Processed text
and Comments » Number of comments
, and I also added boost to the Title
field by setting it to 'Fulltext'Search API Solr, Facets, and Search API Views are definitely an area of Drupal where it's more 'art' than 'science', though. But in the end, the search results are working slightly better than what they were in Drupal 7, so I'm happy :)
I also use one exposed form block for both the sitewide footer search form and the search page search form, so theming was very slightly simplified there :)
I currently use Hosted Apache Solr to host a Drupal 7 search index for my site. I need to create a new index for Drupal 8 so I can start using that with Search API and Search API Solr, and recreate the search functionality on JeffGeerling.com. Note that this issue is a prerequisite to #2.
Details for subscription ID 1181 from Hosted Apache Solr:
solr-1181.hostedapachesolr.com
80
5hE5u_jeffgeerling_com