Question

I'm having trouble querying on a StrField with a large value (say 70k characters). I'm using Solr 4.4 and have documents with a string type:

<fieldType name="string" class="solr.StrField" sortMissingLast="true"/>

and field:

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

Note that it's stored, in case that matters.

Across my documents, the length of the value in this StrField can be up to ~70k characters or more.

The query I'm trying is someFieldName_1:*. If someFieldName_1 has values with length < 32,767 characters, then it works fine and I get back various documents with values in that field.

However, if I query someFieldName_2:* and someFieldName_2 has values with length >= 32,767, I don't get back any documents. Even though I know that many documents have a value in someFieldName_2.

I know this because I query *:* and see documents with (large) values in someFieldName_2.

So is there some type of limit to the length of strings in a StrField that I can query against? 32,767 = 2^15 is mighty suspicious =)

Was it helpful?

Solution

Yonik answered this question on the Solr user mailing list with, "I believe that's the maximum size of an indexed token...". So it seems like the behavior is somewhat expected.

However, another user has opened up a bug report about the lack of errors, "i'll open a bug to figure out why we aren't generating an error for this at index time, but the behavior at query time looks correct..."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top