On 6/7/06, Paul Terray <[EMAIL PROTECTED]> wrote:
I am trying to make an index: Is there any way to get a list of all indexed
terms for a field (especially a string or text one)?

Hi Paul,
There isn't currently a way to do this, except perhaps writing your
own custom request handler and using the lower level Lucene
TermEnumerator after getting your hands on the underlying IndexReader.

This feature has been on my wish-list though.
There needs to be a syntax to request info like this, and then the
implementation.

perhaps something along the lines of a function syntax

@top10=terms("myfield",10)
 // request top 10 terms of "myfield", and return result under "top10"

So then the XML result from Solr would have something like this at the end:
<arr name="top10"><str>term1</str><str>term2</str><str>term3</str></arr>


@top10=termFreqs("myfield",10)   // request top 10 terms and their frequencies
Returns:
<arr name="top10"><str>term1</str><int>142</int>...
 OR
<lst name="top10"><int name="term1">142</int>...


-Yonik

Reply via email to