Hi Guys,

Last several days I am trying to find fast way to obtain all possible values
for a given field, but all the solution that I tried was
not fast enough.
I have several millions of documents indexed in single Solr instance, around
7 million for now, but I want to see how far I can go.
Every document can have several 'special' fields for which I want to know
their possible values (the values that currently are present in the index).
The distinct count of the values is small, lets say around 200 at max. And
these fields are dynamic and defined as follows:

<dynamicField name="*_sl"  type="string"  indexed="true"  stored="true"/>

For now I tried the following things:

- using facet query for these fields, and taking the values that have count
> 1, but this query takes around 15 sec to complete
http://localhost:8983/solr/select?q=*&rows=0&facet=true&facet.limit=-1&facet.field=colour_sl&facet.mincount=1<%20%20http://localhost:8983/solr/select?q=*&rows=0&facet=true&facet.limit=-1&facet.field=colour_sl&facet.mincount=1>

- tweaking the params of filterCache in the solrconfig.xml and switching
between facet.methods fc and enum, but the time was similar

- using the http://wiki.apache.org/solr/TermsComponent the query
http://localhost:8983/solr/terms?terms.fl=colour_sl&terms.limit=-1
<http://localhost:8983/solr/terms?terms.fl=colour_sl&terms.limit=-1%20>
was ultra fast, but since it does provide present data only if you run
optimize (which also is very time consuming operation) before the query,
this also doesn't work.

Are there any other ways ?

Reply via email to