1
|
package eu.dnetlib.data.search.solr;
|
2
|
|
3
|
/**
|
4
|
* Created by kiatrop on 29/6/2016.
|
5
|
*/
|
6
|
|
7
|
|
8
|
public class CqlSolrTransform {
|
9
|
|
10
|
|
11
|
/*
|
12
|
public static void main(String[] args) throws IOException, CQLParseException {
|
13
|
|
14
|
CqlTranslator translator = new CqlTranslatorImpl();
|
15
|
try {
|
16
|
BufferedReader br = new BufferedReader(new FileReader(new File("/home/kiatrop/Desktop/logs/queries.txt")));
|
17
|
FileWriter fw = new FileWriter("/home/kiatrop/Desktop/logs/solrqueriesnew.txt");
|
18
|
|
19
|
String line;
|
20
|
|
21
|
while ((line = br.readLine()) != null) {
|
22
|
fw.write("http://openaire-solr-beta.vls.icm.edu.pl:8983/solr/DMF-index-openaire_shard1_replica1/select?q=" + translator.getTranslatedQuery(URLDecoder.decode(line, "UTF-8")).asLucene()+"\n");
|
23
|
}
|
24
|
|
25
|
} catch (IOException e) {
|
26
|
e.printStackTrace();
|
27
|
}
|
28
|
}
|
29
|
*/
|
30
|
|
31
|
}
|