@View(name = "by_serviceId", map = "function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}")
    public RegisteredServiceDocument findByServiceId(final String serviceId) {
        return queryView("by_serviceId", serviceId).stream().findFirst().orElse(null);
    }
@ View ( name = "by_serviceId" , map = "function(doc) { if (doc.service) { emit(doc.service.serviceId, doc._id) }}" ) public RegisteredServiceDocument findByServiceId ( final String serviceId ) { return queryView ( "by_serviceId" , serviceId ) . stream ( ) . findFirst ( ) . orElse ( null ) ; }
Implements search by serviceId.

@param serviceId The serviceId of the service to find.
@return The service found or +null+.