We want to be able to return the “n” most frequent indexed terms for certain documents selected from a base query. Is that possible using solar?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can do this by turning faceting on and faceting on the field from which you’re trying to get the frequently indexed terms. You might actually get more information then you need (Solr will return all terms ordered by frequency rather than the top n):
If you use
&rows=0as well then Solr will return only the faceting information and not the actual search results as well.EDIT: Actually, by default Solr returns the top 100 facet terms. Use the
facet.limitparameter to change this number. So, to return the top n terms, do the following:Use a negative number for
facet.limitto return all terms. More information here: http://wiki.apache.org/solr/SimpleFacetParameters