This is our custom component class, in which I want to get the data from one core and search data into another core and use facet query and show in descending order. means suppose we get t-shirt name from one core and same t-shirt name we will search it into another core and display the over all result with facet query
package com.shop.component;
import org.apache.solr.handler.component.ResponseBuilder;
import org.apache.solr.handler.component.SearchComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
public class CustomQueryComponent extends SearchComponent{
private static final Logger LOG = LoggerFactory.getLogger(CustomQueryComponent.class);
@Override
public void prepare(ResponseBuilder responseBuilder) throws IOException {
LOG.info("prepare method of CustomQueryComponent");
}
@Override
public void process(ResponseBuilder responseBuilder) throws IOException {
LOG.info("process method of CustomQueryComponent");
}
@Override
public String getDescription() {
return "CustomQueryComponent";
}
}