You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val url = "http://localhost:8983/solr"
val schema = "test-obj"
val solrClient = SolrClient.Builder().urls(listOf(url)).build()
val typeRef = object : TypeReference<List<TestObj>>() {}
class TestObj {
// key
var topicId = ""
var subject = ""
var tags = ""
var content = ""
var userName = ""
var regDt = ""
}
select
val query = SolrQuery().query("*:*").filterQuery("tags:abc").page(10, 0)
val res: SolrResult<*> = solrClient.select(schema, query)
val list: List<TestObj> = res.docs(typeRef)
println("select")
list.forEach(Consumer { e: TestObj? -> println(e) })