class_docstr: Generic service for search records operations
class_docstr_tok: ["Generic","service","for","search","records","operations"]
code: def __init__(
      self,
      dao: DatasetRecordsDAO,
      metrics: MetricsService,
  ):
      self.__dao__ = dao
      self.__metrics__ = metrics
  
file_path: argilla/src/argilla/server/services/search/service.py
imports: import logging
  from typing import Iterable, List, Optional, Set, Type, Union
  from fastapi import Depends
  from argilla.server.daos.models.records import DaoRecordsSearch
  from argilla.server.daos.records import DatasetRecordsDAO
  from argilla.server.errors import RecordNotFound
  from argilla.server.services.datasets import ServiceDataset
  from argilla.server.services.metrics import MetricsService
  from argilla.server.services.metrics.models import ServiceMetric
  from argilla.server.services.search.model import ServiceRecord, ServiceRecordsQuery, ServiceSearchResults, ServiceSortConfig
label_desc: Use image node_id 2 to create a new SearchRecordsService object  with example: obj = SearchRecordsService(dao, metrics)