Fixing Solr error: Cannot parse ‘audio_length:[0 to 900]’: Encountered \”

If you try to do a Solr range query like this:

fq=audio_length:[0 to 900]

You can get an error:

Cannot parse 'audio_length:[0 to 900]': Encountered \"  

The actual answer to this error is to capitalize the “TO” – the documentation Lucidworks provides is incorrect1:

fq=audio_length:[0 TO 900]
  1. https://lucidworks.com/blog/2009/09/02/faceted-search-with-solr/ []

Leave a Reply

Your email address will not be published. Required fields are marked *