Given a IndexComponentsOnlyQuery, return the Index needed to fulfill the query,
or null if no index is needed.
This code needs to remain in sync with its counterparts in other languages. If you modify
this code please make sure you make the same update in the local datastore for other languages.
Given a IndexComponentsOnlyQuery and a collection of existing Indexs, return
the minimum Index needed to fulfill the query, or null if no index is needed.
This code needs to remain in sync with its counterparts in other languages. If you modify
this code please make sure you make the same update in the local datastore for other languages.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCompositeIndexManager\u003c/code\u003e class handles composite index management operations for the datastore API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecompositeIndexForQuery\u003c/code\u003e method determines the specific index required to fulfill a given \u003ccode\u003eIndexComponentsOnlyQuery\u003c/code\u003e, returning \u003ccode\u003enull\u003c/code\u003e if no index is needed.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egenerateXmlForIndex\u003c/code\u003e method creates an XML representation of a given \u003ccode\u003eOnestoreEntity.Index\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eminimumCompositeIndexForQuery\u003c/code\u003e method identifies the least comprehensive \u003ccode\u003eOnestoreEntity.Index\u003c/code\u003e from a provided collection that is sufficient to fulfill a specific query, returning null if no index is needed.\u003c/p\u003e\n"]]],[],null,["# Class CompositeIndexManager (2.0.0)\n\n public class CompositeIndexManager\n\nComposite index management operations needed by the datastore api. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e CompositeIndexManager \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### CompositeIndexManager()\n\n public CompositeIndexManager()\n\nMethods\n-------\n\n### compositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery)\n\n protected @Nullable OnestoreEntity.Index compositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery)\n\nGiven a IndexComponentsOnlyQuery, return the Index needed to fulfill the query,\nor `null` if no index is needed.\n\nThis code needs to remain in sync with its counterparts in other languages. If you modify\nthis code please make sure you make the same update in the local datastore for other languages.\n\n### generateXmlForIndex(OnestoreEntity.Index index, CompositeIndexManager.IndexSource source)\n\n protected String generateXmlForIndex(OnestoreEntity.Index index, CompositeIndexManager.IndexSource source)\n\nGenerate an xml representation of the provided Index.\n\n\u003cbr /\u003e\n\n### minimumCompositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery, Collection\\\u003cOnestoreEntity.Index\\\u003e indexes)\n\n protected @Nullable OnestoreEntity.Index minimumCompositeIndexForQuery(CompositeIndexManager.IndexComponentsOnlyQuery indexOnlyQuery, Collection\u003cOnestoreEntity.Index\u003e indexes)\n\nGiven a IndexComponentsOnlyQuery and a collection of existing Indexs, return\nthe minimum Index needed to fulfill the query, or `null` if no index is needed.\n\nThis code needs to remain in sync with its counterparts in other languages. If you modify\nthis code please make sure you make the same update in the local datastore for other languages."]]