| | |
| | | import com.yeshi.buwan.iqiyi.util.IqiyiUtil; |
| | | import com.yeshi.buwan.service.imp.VideoInfoService; |
| | | import com.yeshi.buwan.service.manager.SolrAlbumDataManager; |
| | | import org.apache.http.auth.Credentials; |
| | | import org.apache.solr.client.solrj.SolrClient; |
| | | import org.apache.solr.client.solrj.SolrRequest; |
| | | import org.apache.solr.client.solrj.SolrServerException; |
| | | import org.apache.solr.common.util.NamedList; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.data.solr.server.support.HttpSolrClientFactory; |
| | | import org.springframework.data.solr.server.support.HttpSolrClientFactoryBean; |
| | | import org.springframework.test.context.ContextConfiguration; |
| | | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| | | import org.springframework.test.context.web.WebAppConfiguration; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @Test |
| | | public void test1() { |
| | | SolrVideoSearchFilter filter = new SolrVideoSearchFilter(); |
| | | filter.setKey("吉他"); |
| | | filter.setKey(""); |
| | | filter.setVideoType(null); |
| | | filter.setContentType(1); |
| | | filter.setResourceIds(new String[]{"24"}); |
| | | // filter.setResourceIds(new String[]{"24"}); |
| | | |
| | | SolrResultDTO dto = solrDataManager.find(filter, 1, 10); |
| | | System.out.println(dto); |
| | |
| | | |
| | | @Test |
| | | public void addSolrAlbum() { |
| | | solrDataManager.syncAlbum("8172667"); |
| | | } |
| | | solrDataManager.syncAlbum("8224447"); |
| | | SolrClient solrClient=new SolrClient() { |
| | | @Override |
| | | public NamedList<Object> request(SolrRequest solrRequest, String s) throws SolrServerException, IOException { |
| | | return null; |
| | | } |
| | | |
| | | @Test |
| | | public void test2() { |
| | | solrDataManager.clear(); |
| | | @Override |
| | | public void close() throws IOException { |
| | | |
| | | } |
| | | }; |
| | | Credentials credentials=new Credentials(); |
| | | HttpSolrClientFactory factory=new HttpSolrClientFactory(); |
| | | |
| | | } |
| | | |
| | | |