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 "English, Eben" <ee...@bpl.org> on 2014/11/18 16:38:27 UTC

faceting on very long strings

Is there any kind of general rule-of-thumb character limit in regards to faceting on very long strings?

I have a string field that I want to facet on (contains geographic data structured as a GeoJSON Feature), where the length is typically around 220 characters. Is this too long to facet on, performance-wise?

If this (~220 chars) is too long, is there some way to hash the long string and copyField for better performance, but in a way that the original string values can be returned as facets in the response?

I know this question is a bit vague, and I would imagine mileage will vary depending on the specifics of the situation. I anticipate the entire index to include about 2 million documents, with possibly about 200,000 unique values for this GeoJSON string field.

Thanks!

Eben English


RE: faceting on very long strings

Posted by Toke Eskildsen <te...@statsbiblioteket.dk>.
English, Eben [eenglish@bpl.org] wrote:
> Is there any kind of general rule-of-thumb character limit in regards to faceting on very long strings?

Not really. There are limits, but they are quite high. Due to a bad analyzer we had an index with ~1M unique facet values that ranged from 100-3000 characters and besides a very messy GUI, we did not notice anything problematic.

> I have a string field that I want to facet on (contains geographic data structured as a GeoJSON Feature),
> where the length is typically around 220 characters. Is this too long to facet on, performance-wise?

I doubt you will be able to measure the difference between that and 10 character strings. There is a question of string comparison upon index open and the result must be serialized, but for most of the facet operations, the length matters little. If your strings were 100 times longer, you might have seen a performance impact.

> [...] possibly about 200,000 unique values for this GeoJSON string field.

I see no problems with this. 200K values of 220 characters is only large if you insist on returning everyone of them as the facet result.

- Toke Eskildsen