Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facets warning with aggregation_context(): unexpected keyword #87

Open
TerpstraS opened this issue Oct 10, 2022 · 0 comments
Open

Facets warning with aggregation_context(): unexpected keyword #87

TerpstraS opened this issue Oct 10, 2022 · 0 comments

Comments

@TerpstraS
Copy link

Hello,

According to the documentation, we always need to supply facets to the search_context(). If not, we get the following warning:

Warning - defaulting to search with facets=*

This behavior is kept for backward-compatibility, but ESGF indexes might not
successfully perform a distributed search when this option is used, so some
results may be missing.  For full results, it is recommended to pass a list of
facets of interest when instantiating a context object.  For example,

      ctx = conn.new_context(facets='project,experiment_id')

Only the facets that you specify will be present in the facets_counts dictionary.

This warning is displayed when a distributed search is performed while using the
facets=* default, a maximum of once per context object.  To suppress this warning,
set the environment variable ESGF_PYCLIENT_NO_FACETS_STAR_WARNING to any value
or explicitly use  conn.new_context(facets='*')

-------------------------------------------------------------------------------

However, the problem is that this warning also appears for aggregation_context(), even though aggregation_context() does not take facets as parameter. Even if I create a new_context() with facets and then create an aggregation_context() out of the ctx.search(), I get the facets warning. (For example with this piece of code:

facets = "source_id"
ctx = conn.new_context(
    project='CMIP6',
    experiment_id="historical",
    facets=facets
)
result = ctx.search()[0]
agg_ctx = result.aggregation_context().search()

).

Is this a problem? Will this lead to an incomplete distributed search or is it something I do not need to worry about?

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant