Project

General

Profile

« Previous | Next » 

Revision 55638

Resolving #4194 and #4031 - csv issues and author field

View differences:

SolrResultSet.java
7 7
import eu.dnetlib.data.search.utils.solr.SolrResultSetOptionsUtil;
8 8
import eu.dnetlib.data.search.utils.solr.SolrResultsFormatter;
9 9
import eu.dnetlib.domain.EPR;
10
import eu.dnetlib.functionality.cql.CqlTranslatorImpl;
10 11
import gr.uoa.di.driver.enabling.resultset.ResultSet;
11 12
import org.apache.commons.lang.StringEscapeUtils;
12 13
import org.apache.log4j.Logger;
......
365 366
        }
366 367
    }
367 368

  
368
 /*   public static void main(String[] args) throws IOException, CQLParseException, SolrServerException {
369
   public static void main(String[] args) throws IOException, CQLParseException, SolrServerException {
369 370
        CloudSolrServer solrClient = new CloudSolrServer("beta.solr.openaire.eu:9983");
370
        solrClient.setDefaultCollection("DMF-index-openaire");
371
        solrClient.setDefaultCollection("TMF-index-openaire");
371 372

  
372 373
        NamedList<String> queryOpts = new NamedList<String>();
373 374

  
374 375
        //q=*:*&start=0&rows=10&cursorMark=*&sort=dateofcollection asc
375
        queryOpts.add("q", new CqlTranslatorImpl().getTranslatedQuery("objIdentifier = acm_________::0002c24f82c295e925a2bdf7bbf49bfc").asLucene());
376
        queryOpts.add("q", new CqlTranslatorImpl().getTranslatedQuery("oaftype=result").asLucene());
376 377
        queryOpts.add("start", "0");
377
        queryOpts.add("rows", "1");
378
        queryOpts.add("fl", "__result");
378
        queryOpts.add("rows", "2");
379
        //queryOpts.add("fl", "__result");
379 380
        queryOpts.add("shards.tolerant","true");
380
        queryOpts.add("cursorMark", "*");
381
        queryOpts.add("sort", "__indexrecordidentifier asc");
381
       // queryOpts.add("cursorMark", "*");
382
        queryOpts.add("sort", "resultdateofacceptance desc");
382 383

  
383 384

  
384 385
        //queryOpts.add("q", new CqlTranslatorImpl().getTranslatedQuery("oaftype exact project").asLucene());
......
388 389

  
389 390
        System.out.println("results " + resp.getResults().size());
390 391

  
391
        String cursorMark = "*";
392

  
393
        /*String cursorMark = "*";
392 394
        String nextCursorMark = "";
393 395

  
394 396
        int curs = 0;
......
463 465

  
464 466
        System.out.println("max: " + max);
465 467
*/
466
 //   }
468
    }
467 469

  
468 470
//    @Override
469 471
//    public EPR getEpr() {

Also available in: Unified diff