Here is the new article with R6 annotations working - along with a video.
Adobe Experience Manager Help | Integrating SOLR with Adobe Experience Manager 6.4
@Component
public class SolrSearchServiceImpl implements SolrSearchService
One difference here is we show new way of reading OSGi config values for this use case. This involves these annotations:
package com.adobe.aem.core;
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.AttributeType;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
@ObjectClassDefinition(name = "AEM Solr Search - Solr Configuration Service", description = "Service Configuration")
public @interface MySimpleService {
@AttributeDefinition(name = "Protocol", defaultValue ="http", description = "Configuration value")
String protocolValue();
@AttributeDefinition(name = "Solr Server Name", defaultValue ="localhost", description = "Server name or IP address")
String serverName();
@AttributeDefinition(name = "Solr Server Port", defaultValue ="8983", description = "Server port")
String serverPort();
@AttributeDefinition(name = "Solr Core Name", defaultValue ="collection", description = "Core name in solr server")
String serverCollection();
@AttributeDefinition(name = "Content page path", defaultValue ="/content/we-retail", description = "Content page path from where solr has to index the pages")
String serverPath();
}