Je suis en train d'utiliser la recherche à facettes avec un référentiel personnalisé comme suit:printemps données Solr - Exception dans le mappage d'un référentiel personnalisé
Repository:
public interface POISearchRepository extends CustomSolrRepository, SolrCrudRepository<POISearch, String>
Interface personnalisée:
public interface CustomSolrRepository {
FacetPage<POISearch> facetSearch(String location, String categories, String duration, Pageable page) throws Exception;
}
Implication personnalisée:
@Repository
public class POISearchImpl implements CustomSolrRepository {
@Resource
private SolrTemplate solrTemplate;
@Override
public FacetPage<POISearch> facetSearch(String location, String categories, String duration, Pageable page) throws Exception {
......
}
Malheureusement, je continue à recevoir l'exception suivante:
Causée par: org.springframework.data.mapping.PropertyReferenceException: Non facette objets trouvés pour le type com.example.domain.POISearch à org.springframework. data.mapping.PropertyPath. (PropertyPath.java:75) à org.springframework.data.mapping.PropertyPath.create (PropertyPath.java:327) à org.springframework.data.mapping.PropertyPath.create (PropertyPath .java: 353) au org.springframework.data.mapping.PropertyPath.create (PropertyPath.java:307) à org.springframework.data.mapping.PropertyPath.from (PropertyPath.java:271) à org.springframework.data.mapping.PropertyPath.from (PropertyPath.java:245) à org.springframework.data .repository.query.parser.Part. (Part.java:72) à org.springframework.data.repository.query.parser.PartTree $ OrPart. (PartTree.java:180) à org.springframework.data .repository.query.parser.PartTree $ Predicate.buildTree (PartTree.java:260) à org.springframework.data.repository.query.parser.PartTree $ prédicats. (PartTree.java:240) à org. springframework.data.repository.query.parser.PartTree. (P artTree.java:68) à org.springframework.data.solr.repository.query.PartTreeSolrQuery. (PartTreeSolrQuery.java:36) à org.springframework.data.solr.repository.support.SolrRepositoryFactory $ SolrQueryLookupStrategy.resolveQuery (SolrRepositoryFactory.java:101) à org.springframework.data.repository.core.support.RepositoryFactorySupport $ QueryExecutorMethodInterceptor. (RepositoryFactorySupport.java:279) à org.springframework.data.repository.core.support.RepositoryFactorySupport. getRepository (RepositoryFactorySupport.java:147) at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject (RepositoryFactoryBeanSupport.java:153) à org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject (RepositoryFactoryBeanSupport.java:43) à org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean (FactoryBeanRegistrySupport.java:142) . .. 57 plus
Il semble que le dépôt tente de résoudre la méthode personnalisée et qui provoque l'exception (en changeant les noms de méthode montre que)