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
Change logging so that it doesn't refer to an sltr query #69
Comments
I wonder if this was done for performance reasons, as most use cases would involve a query. But perhaps we could simply require one of feature_set, rescore_index, or named query. Or offer a caching hint of where to find the features. |
I see now that specifying an sltr query with a featureset, not a model, basically does what I'm describing. |
IIRC this was done because the search extension doesn't have access to the proper objects to read the index, it has to grab a pre-built query from the search context. |
That makes sense @ebernhardson. For posterity sake, below is how I log features for this use case. The should
|
yes, initially I wanted to put everything in the log specs but the QueryShardContext is frozen during the fetch phase and does not allow me to parse a query. It's why I relied on on named query + inpecting the rescore context.
When used inside a filter the sltr query will simply bypass all feature queries during the search phase, it permits to run feature queries only once during the fetch phase. @softwaredoug is there something you'd like to do regarding this ticket? |
No I'm fine with this the way it is, the explanation makes sense! I was able to get the offline case working fine with the pattern you described @nomoa |
Consider "offline" logging use cases where a user batches a set of identifiers and simply wants the scores for each feature for a set of document identifiers (this is what happens currently in the demo). The current logging API expects to find an sltr query in the body.
At first blush, I would prefer a logging interface closer too:
This would log "my_feature_set" for the returned documents.
This seems more flexible than the current logging interface in the 1.0 branch, as it would support several logging use cases.
The text was updated successfully, but these errors were encountered: