0

When we are hitting the range query from hybris server we are getting Error

org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://localhost:8983/solr: Invalid Number: [0 TO 9.99]

Where as if we are passing the value from solr admin console it's working as expected.

enter image description here

From hybris we are passing query like :relevance:length:[0 TO 9.99]

Thanks in advance.

SMKReddy
  • 107
  • 3
  • 13
  • Can you please put a debug point in the method DefaultFacetSearchStrategy#search and copy the actual query that is created by hybris? (it is an instance of SolrQuery class) Also, you can just enable debug for that class. – nikita_pavlenko Apr 28 '20 at 11:16
  • Yeah i have done that. in query i can see fq=allCategories_string_mv:Test&fq=(catalogId:"TestProductCatalog"+AND+catalogVersion:"Online")&fq={!tag%3Dfk3}length_double:\[0\+TO\+9.99\]. But getting invalid number from RemoteSolrException Error from server at https://localhost:8983/solr: Invalid Number: [0 TO 9.99] – SMKReddy Apr 28 '20 at 11:33
  • As you can see from the query fq={!tag%3Dfk3}length_double:[0\+TO\+9.99] your part goes to an "FQ" param, but when you execute it from SOLR Console you put it into "Q" param. Check this out : https://stackoverflow.com/questions/20988516/difference-between-q-and-fq-in-solr – nikita_pavlenko Apr 28 '20 at 11:42
  • But i am passing :relevance:length:[0 TO 9.99] as search query(i.e 'q' param) to the controller. Internally it is adding to fq. Also can you please guide me how to get the range filter without defining the range set in index property. Thanks – SMKReddy Apr 28 '20 at 11:46
  • I have fixed the issue by overriding convertQueryField() of AbstractFacetSearchQueryPopulator to avoid escape characters. – SMKReddy Apr 28 '20 at 15:52

0 Answers0