Use underscore instead?   

It's really necessary for Solr to restrict the characters in a field name since 
they get used in various contexts and java identifier like seems reasonable, no?

        Erik


On May 11, 2013, at 16:10 , Ken Krugler wrote:

> Hi all,
> 
> We have a fieldname that uses the "|" character to separate elements (e.g. 
> state|city)
> 
> Up until Solr 4.x this has worked fine.
> 
> Now, when doing a query that gets distributed across shards, we get a 
> SolrException:
> 
> SEVERE: org.apache.solr.common.SolrException: can not use FieldCache on a 
> field which is neither indexed nor has doc values: state
>       at 
> org.apache.solr.schema.SchemaField.checkFieldCacheSource(SchemaField.java:186)
>       at org.apache.solr.schema.StrField.getValueSource(StrField.java:72)
>       at 
> org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:362)
>       at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:68)
>       at org.apache.solr.search.QParser.getQuery(QParser.java:142)
>       at 
> org.apache.solr.search.SolrReturnFields.add(SolrReturnFields.java:285)
>       at 
> org.apache.solr.search.SolrReturnFields.parseFieldList(SolrReturnFields.java:112)
>       at 
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:98)
>       at 
> org.apache.solr.search.SolrReturnFields.<init>(SolrReturnFields.java:74)
>       at 
> org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:96)
> 
> The problem appears to be that the fl= state|city parameter is getting split 
> up by the FunctionQParser, and it tries to use "state" as a field name. This 
> actually exists, but as an ignored field (since we can just do a  
> q=state|city:ca|* to find all entries in California).
> 
> Is this a known issue? Is there any way to disable the parsing of field names 
> in a field list?
> 
> Thanks,
> 
> -- Ken
> 
> --------------------------
> Ken Krugler
> +1 530-210-6378
> http://www.scaleunlimited.com
> custom big data solutions & training
> Hadoop, Cascading, Cassandra & Solr
> 
> 
> 
> 
> 

Reply via email to