| | |
| | | package com.hxh.spring.test; |
| | | |
| | | import com.yeshi.buwan.util.SolrUtil; |
| | | import org.junit.Test; |
| | | import org.yeshi.utils.LinuxRemoteCommandUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.junit.Test; |
| | | |
| | | import com.yeshi.buwan.util.SolrUtil; |
| | | |
| | | public class Solr { |
| | | |
| | | @Test |
| | | public void test1() { |
| | | List<Long> videoTypeIds = new ArrayList<Long>(); |
| | | videoTypeIds.add(150L); |
| | | SolrUtil.getCategoryVideoList(1, "春风十里", 1, videoTypeIds); |
| | | } |
| | | @Test |
| | | public void test1() { |
| | | List<Long> videoTypeIds = new ArrayList<Long>(); |
| | | videoTypeIds.add(150L); |
| | | SolrUtil.getCategoryVideoList(1, "春风十里", 1, videoTypeIds); |
| | | } |
| | | |
| | | @Test |
| | | public void test2() { |
| | | Map<String, Object> map = SolrUtil.getCategoryVideoList(1, "我的父亲我的兵", 1, null, "id desc"); |
| | | System.out.println(map); |
| | | } |
| | | @Test |
| | | public void test2() { |
| | | String solrIP = "203.195.196.115"; |
| | | String serverAccount = "root"; |
| | | String serverPwd = "Yeshi2016@"; |
| | | try { |
| | | LinuxRemoteCommandUtil.execute(solrIP, serverAccount, serverPwd, "/solr/solr-7.5.0/solr_restart.sh"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void test3() { |
| | | SolrUtil.dataimportVideo(); |
| | | } |
| | | |
| | | } |