Project

General

Profile

1 44065 katerina.i
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 47316 katerina.i
    /*
12 44065 katerina.i
    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 47316 katerina.i
25 44065 katerina.i
        } catch (IOException e) {
26
                e.printStackTrace();
27
            }
28
    }
29 47316 katerina.i
*/
30 44065 katerina.i
31
}