SolrCore-class {rsolr}R Documentation

SolrCore

Description

The SolrCore object represents a core hosted by a Solr instance. A core is essentially a queryable collection of documents that share the same schema. It is usually not necessary to interact with a SolrCore directly.

Details

The typical usage (by advanced users) would be to construct a custom SolrQuery and execute it via the docs, facets or (the very low-level) eval methods.

Accessor methods

In the code snippets below, x is a SolrCore object.

Constructor

Reading

Summarizing

Updating

Evaluation

Coercion

Author(s)

Michael Lawrence

See Also

SolrFrame, the typical way to interact with a Solr core.

Examples


     solr <- TestSolr()
     sc <- SolrCore(solr$uri)
     name(sc)
     ndoc(sc)

     delete(sc)
     
     docs <- list(
        list(id="2", inStock=TRUE, price=2, timestamp_dt=Sys.time()),
        list(id="3", inStock=FALSE, price=3, timestamp_dt=Sys.time()),
        list(id="4", price=4, timestamp_dt=Sys.time()),
        list(id="5", inStock=FALSE, price=5, timestamp_dt=Sys.time())
     )
     update(sc, docs)

     q <- SolrQuery(id %in% as.character(2:4))
     read(sc, q)

     solr$kill()


[Package rsolr version 0.0.13 Index]