Thanks for the answer. This is not a need for the moment, but it could be in the near future.
If it becomes so, I will see how we can implement such a thing. As for the syntax, I would see another parameter for the request (and maybe another URL, as the function is clearly different). Something like: http://localhost:8983/solr/terms/?fl=myfield&rows=10 But perhaps am I completely off-course (I am no Java developer, sorry). -----Message d'origine----- De : Yonik Seeley [mailto:[EMAIL PROTECTED] Envoyé : mercredi 7 juin 2006 15:41 À : solr-user@lucene.apache.org Objet : Re: List of indexed terms for a field 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