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

Framework does not allow a solr operation that includes faceting and highlighting combined [DATASOLR-244] #368

Closed
spring-projects-issues opened this issue Jun 29, 2015 · 4 comments

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jun 29, 2015

Carlos Carapito opened DATASOLR-244 and commented

The AbstractSolrQuery.java has a conditional on line 141 that throws an exception if the query includes both highlighting and faceting.

Caused by: org.springframework.dao.InvalidDataAccessApiUsageException: Facet and Highlight cannot be combined.
	at org.springframework.data.solr.repository.query.AbstractSolrQuery.execute(AbstractSolrQuery.java:142)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:451)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:429)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
...

A query that does both is completely legal and supported by the Solr server.

If this can't be supported by the SolrRepository, or the SolrTemplate approaches, then either the developer is left searching for a different framework to use that allows this type of querying, or he has to implement his own solr client by hand


Affects: 1.5 M1 (Gosling)

Reference URL: https://github.com/spring-projects/spring-data-solr/blob/master/src/main/java/org/springframework/data/solr/repository/query/AbstractSolrQuery.java#L141

Referenced from: pull request #65, and commits fe12122, a5cbb05

8 votes, 9 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Apr 23, 2016

Petar Tahchiev commented

How is this not critical???? It's been 1 year, 6 votes for it and it is still missing this very core functionality

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 19, 2016

David Webb commented

Chris, can you assign this to me please. I will have a PR for you soon. Thanks

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 19, 2016

David Webb commented

PR 65 Created with tests

#65

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 20, 2016

Christoph Strobl commented

thanks David Webb - looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants