Start Solr
bin/solr start -c

Create collection
bin/solr create -c books

Inject some CVS data: 
https://github.com/apache/solr/blob/main/solr/example/exampledocs/books.csv
bin/post -c books example/exampledocs/books.csv

Query to see only books with price from $7:
http://localhost:8983/solr/#/books/query?q=*:*&fq=price:%5B7%20TO%20*%5D

You could of course query this from Java using our SolrJ client library.

Perhaps that is a starting point for you to formulate in a better way what you 
are trying to achieve?

Jan

> 27. jan. 2023 kl. 08:38 skrev marc nicole <mk1853...@gmail.com>:
> 
> In, java i want to create index of a collection named person and say an
> "Age" attribute for the values between 20 and 35. so that when i query Solr
> on those values it retrieves them quickly how to do that ?
> 
> Le ven. 27 janv. 2023 à 03:42, Shawn Heisey <apa...@elyograg.org> a écrit :
> 
>> On 1/26/2023 2:22 PM, marc nicole wrote:
>>> Hello - I want to know how it is possible to create indexes for a certain
>>> attribute (and its different values) of a document, using Java.
>> 
>> This is a pretty vague question.  We need details of exactly what you're
>> trying to do and what the environment looks like.
>> 
>> Thanks,
>> Shawn
>> 
>> 

Reply via email to