You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by neosky <ne...@yahoo.com> on 2012/04/20 18:31:43 UTC

How can I get the top term in solr?

Actually I would like to know two meaning of the top term in document level
and index file level.
1.The top term in document level means that I would like to know the top
term frequency in all document(only calculate once in one document)
The solr schema.jsp seems to provide to  top 10 term, but it only works in
small index set. When the index gets large, it is hardly to get the result.
Suppose I want to use the Solrj to get the top 20 term, What should I do?
I have reviewed the schema.jsp, but I have no idea how they do this.

2.Another is that I also would like to know how many times of the a specific
term appear in the index. I would like to know the total number=
sum(document*appear times in this document)

Any idea will be appreciated.



--
View this message in context: http://lucene.472066.n3.nabble.com/How-can-I-get-the-top-term-in-solr-tp3926536p3926536.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How can I get the top term in solr?

Posted by neosky <ne...@yahoo.com>.
You are very helpful. Thanks a lot!

--
View this message in context: http://lucene.472066.n3.nabble.com/How-can-I-get-the-top-term-in-solr-tp3926536p3931252.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How can I get the top term in solr?

Posted by Dan Tuffery <da...@gmail.com>.
1) The TermsComponent will return the top terms:

http://wiki.apache.org/solr/TermsComponent

2) Add 'debugQuery=on' to your query, look at the 'explain' section in the
results to get information regarding how many times the term appears in the
document (idf).

On Fri, Apr 20, 2012 at 5:31 PM, neosky <ne...@yahoo.com> wrote:

> Actually I would like to know two meaning of the top term in document level
> and index file level.
> 1.The top term in document level means that I would like to know the top
> term frequency in all document(only calculate once in one document)
> The solr schema.jsp seems to provide to  top 10 term, but it only works in
> small index set. When the index gets large, it is hardly to get the result.
> Suppose I want to use the Solrj to get the top 20 term, What should I do?
> I have reviewed the schema.jsp, but I have no idea how they do this.
>
> 2.Another is that I also would like to know how many times of the a
> specific
> term appear in the index. I would like to know the total number=
> sum(document*appear times in this document)
>
> Any idea will be appreciated.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-can-I-get-the-top-term-in-solr-tp3926536p3926536.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>