To my knowledge data is stored in the commitTransaction operation in the storage layer so extending this by calling the base operation and after that making your query to the webserver should yield the desired results.
For this to work you would have to create a storage extension (not a deployer extension!); i believe Will explains how the factory commits the changes here
Conceptually this would look something linke
public class IndexingJPADAOFactory extends JPADAOFactory {
public void commitTransaction(String transactionId) throws StorageException {
try {
super.commitTransaction(transactionId);
indexPublishedPages(transactionId);
}
catch (StorageException storageException) {
throw storageException;
}
catch (Exception indexingException) {
log.error("Error indexing content: " + indexingException.getMessage());
}
}
}