Yes.

Except that I don't want to facet the entire text field (as it can contain 
thousands of words).

I would like to:

- loop throught the documents in my core
- extract the most-frequently-appearing words in each document's text field
- generate a .vm  which displays those words ranked number of occurrences, or, 
ideally, automatically generate that .vm whenever users use SOLR.






----- Mail original -----
De: "Erik Hatcher" <erik.hatc...@gmail.com>
À: solr-user@lucene.apache.org
Envoyé: Vendredi 13 Mars 2015 15:05:21
Objet: Re: Word frequency

Do you mean like faceting on one of your full text fields?   Something like 
/browse?facet.field=_text or one of your other fields?


—
Erik Hatcher, Senior Solutions Architect
http://www.lucidworks.com <http://www.lucidworks.com/>




> On Mar 13, 2015, at 4:16 AM, phi...@free.fr wrote:
> 
> Hello,
> 
> is it possible to create dynamic facets with SOLR 5.0.0?
> 
> For instance, I would like to display the most-frequently occurring words in 
> the left-hand side of my Velocity SOLR GUI (facet_fields.vm).
> 
> Facet_fields.vm currently looks like this:
> 
> 
> -----------------------------------------------
> #**
> *  Display facets based on field values
> *  e.g.: fields specified by &facet.field=
> *#
> 
> #if($response.facetFields)
>  <h2 #annTitle("Facets generated by adding &facet.field= to the request")>
>    ##Field Facets
>    Results
>  </h2>
>  #foreach($field in $response.facetFields)
>    ## Hide facets without value
>    #if($field.values.size() > 0)
>      <span class="facet-field">$field.name</span>
>      <ul>
>        #foreach($facet in $field.values)
>          <li>
>            <a href="#url_for_facet_filter($field.name, 
> $facet.name)">$facet.name</a> ($facet.count)
>          </li>
>        #end
>      </ul>
>    #end  ## end if > 0
>  #end    ## end for each facet field
> #end      ## end if response has facet fields
> 
> ------------------------------------------
> 
> Many thanks.
> 
> Philippe

Reply via email to