akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Create Index for optimized answer retreival #3932

Open dedenbangkit opened 1 year ago

dedenbangkit commented 1 year ago

In order to use projection queries for answers, we need to create the following index:

The suggested index for this query is:

<datastore-index kind="QuestionAnswerStore" ancestor="false" source="manual">
    <property name="questionID" direction="asc"/>
    <property name="surveyInstanceId" direction="asc"/>
    <property name="value" direction="asc"/>
</datastore-index>

See: https://github.com/akvo/akvo-flow-api/issues/244