@@ -149,7 +149,10 @@ protected void addTracks(final String databaseId, String releaseId)
149149 FieldKey .fromString ("description" ),
150150 FieldKey .fromString ("isprimarytrack" ),
151151 FieldKey .fromString ("vcfId/dataid/DataFileUrl" ),
152- FieldKey .fromString ("releaseId/luceneIndex/dataid/DataFileUrl" )
152+ FieldKey .fromString ("releaseId/luceneIndex" ),
153+ FieldKey .fromString ("releaseId/luceneIndex/dataid/DataFileUrl" ),
154+ FieldKey .fromString ("vcfIndexId" ),
155+ FieldKey .fromString ("vcfIndexId/dataid/DataFileUrl" )
153156 );
154157
155158 TableInfo tracksPerRelease = QueryService .get ().getUserSchema (getContainerUser ().getUser (), getContainerUser ().getContainer (), mGAPSchema .NAME ).getTable (mGAPSchema .TABLE_TRACKS_PER_RELEASE );
@@ -278,9 +281,18 @@ private String getOrCreateJsonFile(Results rs, String fieldKey) throws SQLExcept
278281
279282 if (isDefaultTrack )
280283 {
281- boolean hasLuceneIndex = StringUtils .trimToNull (rs .getString (FieldKey .fromString ("releaseId/luceneIndex/dataid/DataFileUrl" ))) != null ;
282- getStatusLogger ().info ("Creating track JSON for primary track, has lucene index: " + hasLuceneIndex );
283- row .put ("trackJson" , getTrackJson (hasLuceneIndex ));
284+ boolean expectIndex = rs .getObject (FieldKey .fromString ("releaseId/luceneIndex" )) != null || rs .getObject (FieldKey .fromString ("vcfIndexId" )) != null ;
285+
286+ boolean hasLuceneIndex = StringUtils .trimToNull (rs .getString (FieldKey .fromString ("releaseId/luceneIndex/dataid/DataFileUrl" ))) != null ||
287+ StringUtils .trimToNull (rs .getString (FieldKey .fromString ("vcfIndexId/dataid/DataFileUrl" ))) != null ;
288+
289+ if (expectIndex && !hasLuceneIndex )
290+ {
291+ getStatusLogger ().warn ("Expected VCF index but did not find one for outputId: " + outputFileId );
292+ }
293+
294+ getStatusLogger ().info ("Creating track JSON for primary track, has lucene index: " + expectIndex + " / " + hasLuceneIndex );
295+ row .put ("trackJson" , getTrackJson (expectIndex ));
284296 }
285297 else
286298 {
0 commit comments