-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Developer Tools
Autocompletion should recommend only fields that are in the intersection of the schemas of the target queries.
public List<Document> queryMoviesByYear(String year) { return client .getDatabase("sample_mflix") .getCollection("movies") .aggregate(List.of( createMatchStage(year), createGroupStage(), createProjectStage(), createSortStage() )) .into(new ArrayList<>()); } public List<Document> queryCommentsByYear(String year) { return client .getDatabase("sample_mflix") .getCollection("comments") .aggregate(List.of( createMatchStage(year), createGroupStage(), createProjectStage(), createSortStage() )) .into(new ArrayList<>()); } private Bson createMatchStage(String year) { return Aggregates.match(Filters.eq("year", year)); } private Bson createGroupStage() { return Aggregates.group("newField", Accumulators.avg("test", "$year"), Accumulators.sum("test2", "$year"), Accumulators.bottom("field", Sorts.ascending("year"), "$year") ); } private Bson createProjectStage() { return Aggregates.project(Projections.fields(Projections.include("year", "plot"))); } private Bson createSortStage() { return Aggregates.sort(Sorts.orderBy(Sorts.ascending("asd", "qwe"))); }
- is duplicated by
-
INTELLIJ-162 Autocompletion does not trigger when the method call is not inline
-
- Closed
-