I have the solr indexed data as below
<doc>
<str name="pincode">792056</str>
<str name="city">Bijoypur-I Bl.I -III</str>
<str name="district">Changlang</str>
<str name="locality">Bijoypur-I Bl.I -III</str>
<str name="state">Arunachal Pradesh</str>
</doc>
My problem is for 10 distinct pincodes from the same state i have 10 documents and when i query for the states using the query http://ip:port/solr/select?q=state:Arunachal Pradesh
it returns 10 values with the same state name, But i need the distinct values of state name only, Please help me on this
Check grouping/field collapsing feature in SOLR
&q=solr+memory&group=true&group.field=manu_exact
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With