Package org.elasticsearch.common.joda.time

Examples of org.elasticsearch.common.joda.time.Interval


    }
    if (o instanceof String) {
      AdvancedQueryPojo.QueryTermPojo.TimeTermPojo time = new AdvancedQueryPojo.QueryTermPojo.TimeTermPojo();
      if (minNotMax) {
        time.min = (String) o;
        Interval i = QueryHandler.parseMinMaxDates(time, 0L, new Date().getTime(), false);
        return i.getStart().toDate();
      }
      else {
        time.max = (String) o;
        Interval i = QueryHandler.parseMinMaxDates(time, 0L, new Date().getTime(), false);
        return i.getEnd().toDate();       
      }
    }
    else {
      return null;
    }
View Full Code Here


  private BaseQueryBuilder parseDateTerm(AdvancedQueryPojo.QueryTermPojo.TimeTermPojo time, StringBuffer sQueryTerm, String sFieldName, boolean lockMaxToNow)
  {
    BaseQueryBuilder termQ = null;
    long nMinTime = 0L;
    long nMaxTime = _nNow;
    Interval interval = parseMinMaxDates(time, nMinTime, nMaxTime, lockMaxToNow);
    nMinTime = interval.getStartMillis();
    nMaxTime = interval.getEndMillis();
   
    termQ = QueryBuilders.constantScoreQuery(
        FilterBuilders.numericRangeFilter(sFieldName).from(nMinTime).to(nMaxTime)).boost((float)1.0);

    sQueryTerm.append(sFieldName).append(":[").
View Full Code Here

      long tmp = nMinTime;
      nMinTime = nMaxTime;
      nMaxTime = tmp;
    }//TESTED (by hand)
   
    return new Interval(nMinTime, nMaxTime);   
  }
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.joda.time.Interval

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.