Realtime Get
The realtime get allows retrieval of the latest version of any document using the unique-key, without the need to reopen searchers.
realtime get relies on the update log feature. |
Example 1. Realtime get
Product product = solrTemplate.getById("123", Product.class);
Multiple documents can be retrieved by providing a collection of ids as follows:
Example 2. Realtime multi-get
Collection<String> ids = Arrays.asList("123", "134");
Collection<Product> products = solrTemplate.getById(ids, Product.class);