lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Fallback Local Requests
Date Tue, 17 Dec 2013 13:14:55 GMT
Hi Senthilnathan,

I not 100% sure but I https://issues.apache.org/jira/browse/SOLR-5005 could be used such cases.





On Tuesday, December 17, 2013 2:56 PM, Senthilnathan Vijayaraja <senthilnathan@8kmiles.com>
wrote:
Hi,

my query format is,

q=(price_min:[100000 TO 800000] OR price_max:[100000 TO 800000])AND
(size_min:[1000 TO 5000] OR size_max:[1000 TO 5000])....

  if this query returns 0 results then
    -->fire a fallback query after changing the value of size_min and
size_max
        q=(price_min:[100000 TO 800000] OR price_max:[100000 TO 800000])AND
(size_min:[100 TO 500] OR size_max:[100 TO 500])
  if, again it gives 0 results then
    -->fire a fallback query after changing the value of price_min and
price_max
        q=(price_min:[1000 TO 8000] OR price_max:[1000 TO 8000])AND
(size_min:[100 TO 500] OR size_max:[100 TO 500])

        I wrote a custom request handler to achieve this and now it is
working fine but in my code,

        I got the value of 'q' param like,

        String[] paramVals = reqParams.getParams("q");//(price_min:[100000
TO 800000] OR price_max:[100000 TO 800000])AND (size_min:[1000 TO 5000] OR
size_max:[1000 TO 5000])

        and  manually replaced the price_min,price_max,size_min,size_max
values using string functions,there by I formed two LocalRequests for
handling  this.


Is there any better way to handle this,I want this to be more
configurable..???





Thanks & Regards,
Senthilnathan V


Mime
View raw message