Below query gives be the unique values of that field. But it returns only top 100. Not sure how to get all the unique values.
"'http://localhost:8983/solr/select/?q=%3A&rows=0&facet=on&facet.field=txt'"
PS: My field is a tokenized field. Not sure if that makes any difference.
You can use
facet.limitto change the number of returned values. Set it to-1to make Solr return all possible values for a field and not just the top 100.You can also use
f.txt.facet.limit=-1if you have more than one facet and just want to change the value for that single field.You can also use the Terms component to retrieve the tokens indexed for a specific field - depending on your use case it might be more efficient to use the terms component instead - you'll have to evaluate the performance for your exact use case and setup.