Kindly let us know can we paginate over facets values. Our requirement is to retrieve all the values for a particular field. Since we may have hundreds of thousands of values for a particular field,it would be nice if some pagination API is available in ES, so that we could get all the available values not at one go but in smaller chunks of 50,100, 200...
Currently we are using TermsFacetBuilder to get top 100 or 200 values for a field but it has limitations as the values grows large in numbers - memory consumption would be high. The following snippet shows how are we forming queries for facets -
where builder is an instance of SearchRequestBuilder and topDataCount is an int variable which holds the size. After we execute query we iterate on the SearchRespnse object to get the values of facets.
The problem with this approach is that we have to set the size in advance and for large sizes there is danger of high processing time and high memory footprint.
So please let us know if there is some pagination kind of framework available for facets to iterate over its values in smaller chunks.
Kindly let us know can we paginate over facets values. Our requirement is
to
retrieve all the values for a particular field. Since we may have hundreds
of thousands of values for a particular field,it would be nice if some
pagination API is available in ES, so that we could get all the available
values not at one go but in smaller chunks of 50,100, 200...
Currently we are using TermsFacetBuilder to get top 100 or 200 values for a
field but it has limitations as the values grows large in numbers - memory
consumption would be high. The following snippet shows how are we forming
queries for facets -
where builder is an instance of SearchRequestBuilder and topDataCount is an
int variable which holds the size. After we execute query we iterate on the
SearchRespnse object to get the values of facets.
The problem with this approach is that we have to set the size in advance
and for large sizes there is danger of high processing time and high memory
footprint.
So please let us know if there is some pagination kind of framework
available for facets to iterate over its values in smaller chunks.
Kindly let us know can we paginate over facets values. Our requirement is
to
retrieve all the values for a particular field. Since we may have hundreds
of thousands of values for a particular field,it would be nice if some
pagination API is available in ES, so that we could get all the available
values not at one go but in smaller chunks of 50,100, 200...
Currently we are using TermsFacetBuilder to get top 100 or 200 values for
a
field but it has limitations as the values grows large in numbers - memory
consumption would be high. The following snippet shows how are we forming
queries for facets -
where builder is an instance of SearchRequestBuilder and topDataCount is
an
int variable which holds the size. After we execute query we iterate on
the
SearchRespnse object to get the values of facets.
The problem with this approach is that we have to set the size in advance
and for large sizes there is danger of high processing time and high
memory
footprint.
So please let us know if there is some pagination kind of framework
available for facets to iterate over its values in smaller chunks.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.