0

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.

Nkl Kumar
  • 41
  • 4

1 Answers1

3

You can use facet.limit to change the number of returned values. Set it to -1 to make Solr return all possible values for a field and not just the top 100.

&facet=on&facet.field=txt&facet.limit=-1

You can also use f.txt.facet.limit=-1 if 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.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
  • Awesome!!!.. thanks. MatsLindh. Setting facet.limit=-1 did the magic. I will check out the terms component and post an updated soon. – Nkl Kumar Jul 05 '22 at 06:18