All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.pds.harvest.dao.SchemaUtils Maven / Gradle / Ivy

package gov.nasa.pds.harvest.dao;

import java.util.Set;

import gov.nasa.pds.harvest.meta.FieldNameCache;

/**
 * Utility methods to work with elasticsearch schema
 * @author karpenko
 */
public class SchemaUtils
{
    /**
     * Update fields cache of Elasticsearch registry index.
     * @throws Exception
     */
    public static void updateFieldsCache() throws Exception
    {
        SchemaDao schemaDao = RegistryManager.getInstance().getSchemaDAO();
        Set fields = schemaDao.getFieldNames();
        FieldNameCache.getInstance().set(fields);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy