Package org.elasticsearch.index.query

Examples of org.elasticsearch.index.query.RangeFilterBuilder.lte()


                }

                if (from != null)
                    rfb.to(to).includeUpper(true);
                else
                    rfb.lte(to);
            }

            if (from == null && to == null)
                return FilterBuilders.existsFilter(val);
View Full Code Here


    public void deleteUntil(Date removeUntil) {
        logger.info("Deleting tweets older than " + removeUntil);
        NotFilterBuilder notPersistentFilter = FilterBuilders.notFilter(FilterBuilders.existsFilter(UPDATE_DT));
        FilterBuilder fewRetweetsFilter = FilterBuilders.rangeFilter(RT_COUNT).lt(100).includeUpper(false);
        RangeFilterBuilder tooOldFilter = FilterBuilders.rangeFilter(DATE);
        tooOldFilter.lte(removeUntil);
        FilterBuilder filter = FilterBuilders.andFilter(tooOldFilter,
                notPersistentFilter, fewRetweetsFilter);

        client.prepareDeleteByQuery(getIndexName()).setTypes(getIndexType()).
                setQuery(QueryBuilders.filteredQuery(QueryBuilders.matchAllQuery(), filter)).
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.