-
Notifications
You must be signed in to change notification settings - Fork 85
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
How to override responseWriter value #4
Comments
SolrJ is designed for the javabin format though you can handle json with some tweaks as you need to have a |
Thanks for the response. What I understood after reading about javabin is that there is no need to convert the response to json as javabin should get converted to pojo automatically. But somehow that is not happening and I am not sure how to debug that. My pojo is like -
//getter and setters,,,,// And Repository - interface ProductRepository extends SolrCrudRepository<Keyword, String> {
} The implemented method - @OverRide
But when I am getting list inside my page object by calling the method is showing unknown instance - Where as I can see the query in my solr log - |
@dbjr84 you cannot return page of type keyword (I guess it is not your model type) Please return Page or Slice of Model type (which as far as your naming convention is concerned i guess it is product). |
I need to override the default value of responseWiter in Query annotation. The default value is javabin. But the solr server is expecting wt=json. Eg -
org.apache.solr.core.SolrCore: [ac_shard1_replica2] webapp=/solr path=/suggest_keyword params={fl=keyword,user_count&sort=user_count+desc&indent=true&q=jea&wt=json&rows=5} hits=14 status=0 QTime=1
But when I am using @query the generate log is -
org.apache.solr.core.SolrCore: [ac_shard1_replica2] webapp=/solr path=/suggest_keyword params={start=0&q=keyword:app&wt=javabin&qt=/suggest_keyword&version=2&rows=0} hits=0 status=0 QTime=1
And solr server returning some html file to this but the json response. How can I set the value to json instead of javabin ??
Thanks in advance.
The text was updated successfully, but these errors were encountered: