Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception : No property facet found [DATASOLR-78] #200

Closed
spring-projects-issues opened this issue May 26, 2013 · 3 comments
Closed

Exception : No property facet found [DATASOLR-78] #200

spring-projects-issues opened this issue May 26, 2013 · 3 comments
Assignees
Labels
in: repository status: invalid

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 26, 2013

Assaf opened DATASOLR-78 and commented

Hi,

I am trying to use faceted search with a custom repository as follows:

Repository:
public interface POISearchRepository extends CustomSolrRepository, SolrCrudRepository<POISearch, String>

Custom interface:
public interface CustomSolrRepository {

FacetPage<POISearch> facetSearch(String location, String categories, String duration, Pageable page) throws Exception;

}

Custom impl:

@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 {

......

Unfortunately, I keep getting the following exception:

Caused by: org.springframework.data.mapping.PropertyReferenceException: No property facet found for type com.example.domain.POISearch
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:75)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:327)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:353)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:307)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:271)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:245)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:72)
at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:180)
at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:260)
at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:240)
at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:68)
at org.springframework.data.solr.repository.query.PartTreeSolrQuery.<init>(PartTreeSolrQuery.java:36)
at org.springframework.data.solr.repository.support.SolrRepositoryFactory$SolrQueryLookupStrategy.resolveQuery(SolrRepositoryFactory.java:101)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:279)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:147)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:153)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:43)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
... 57 more

It seems like the repository tries to resolve the custom method and that causes the exception (changing the method names shows that)


No further details from DATASOLR-78

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 26, 2013

Christoph Strobl commented

hi,
please have a look at 1.3 Custom implementations for Spring Data repositories and rename POISearchImpl to POISearchRepositoryImpl.
Hope this helps.

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 26, 2013

Assaf commented

Thanks Christoph! This worked!

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 26, 2013

Christoph Strobl commented

You're welcome. Glad I could help

@spring-projects-issues spring-projects-issues added status: invalid in: repository labels Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository status: invalid
Projects
None yet
Development

No branches or pull requests

2 participants