package com.chinaweal.aiccs.aiccs.claim.repository;

import com.chinaweal.aiccs.aiccs.claim.entity.SolrExGongan128Xdzkdy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.solr.repository.Query;
import org.springframework.data.solr.repository.SolrCrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SolrExGongan128XdzkdyRepository extends SolrCrudRepository<SolrExGongan128Xdzkdy, String> {


    // 自定义复杂查询（使用 @Query 注解）
    @Query(value = "((DZMC:\"?0\")^10 OR (DZMC_ngram:\"?0\")^5 OR (DZMC:\"?1\")^8 OR (DZMC_ngram:\"?1\")^3)")
    List<SolrExGongan128Xdzkdy> fuzzySearchAddress(String dom, String sdom, Pageable pageable);
}
