문제

solr have a admin console like

http://localhost:8982/solr/admin/schema.jsp

which provides some schema fields data like top terms and freq for specific field.

I am using sunspot, and how to query data like this? like TOP 10 terms

도움이 되었습니까?

해결책

Not sure for Sunspot but check for Solr TermsComponent which will allow you to retrieve the top terms with the frequency from a field.

다른 팁

while, my current solution is using Luke query some XML data and parse it by hand http://wiki.apache.org/solr/LukeRequestHandler

for anyone who is interesting.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top