Closed hendisantika closed 6 years ago
Coba.scala --> It add to solr repo but the query result is not working
If following query works, schema is invalid. Has name
field been tokenized correct?
val result = client.query("id: %id%")
.fields("id", "manu", "name")
.sortBy("id", Order.asc)
.getResultAsMap(Map("id" -> "001"))
AsyncSolrClientSample.scala --> Can not add and query.
I tested and worked in my environment. It's strange...
SolrClientSample.scala --> Can not add and query.
Remove following code which provides a mock client. If this code is available, all methods of client don't access to the real Solr server.
implicit val solr = SolrClientFactory.dummy { request =>
println(request.getMethod)
println(request.getPath)
println(request.getParams)
}
I have tried on my Environment but the result was not ok.
Could you please test my repo https://github.com/hendisantika/Coba-Solr
It originally from your sample.
Let me know details of your situation. There are too few clues to find a cause.
Coba.scala
? How was the result?My 2 friends are also tried my repo. They are still have the same issues like mine.
- I follow your example. It is exactly same with your code because I copied from yours.
Sorry, my words was not enough. I want to reproduce your environment to test your code on same situation as you. So let me know:
- Yes, I did.
- Empty result. Nothing print on my terminal
Thanks. I have two more question to you:
*:*
query)?Result depends on environment. In my environment:
org.apache.solr.common.SolrException: parsing error
. However only query succeeds by removing last /
in a url as "http://localhost:8983/solr/gettingstarted"
.implicit val solr = SolrClientFactory.dummy { ... }
. After removing this part both register and query succeed.From these results, I can say:
I will raise new issues about them. But I couldn't find other problem. In particular, the sync client has worked with no problem.
I guess name
field is not tokenized in your environment because your gettingstarted
collection was created with data_driven_schema_configs
option. Therefore maybe only exact match search is available for this field. However this is just my guess.
This is all I can do. Unfortunately, maybe I can't help you any more.
Ooo.. I see that.
I want to use yout Async method for my test.
At least I know the issue from your explainations.
By The way.
Arigatou Gozaimasu. :+1:
Fix async client example in 0a6943683991b22531f12723234b8f10d00a1c90. Querying had required waiting registration. I confirmed that async client work well in this code.
OK. I will retry. Thanks to you @takezoe
I have tried your example for regular client and Async but it did not work for query. I have created a repo so that so can try it.
https://github.com/hendisantika/Coba-Solr
Here are my notes :
Please give me an advice and solution.
Thanks