java - nested filter query in apache solr -
I have indexed data from the problem to apacheresolar, problem I am not able to query it here, Sharing code
parameters.set ("q", "*: *"); Parameters.set ("fl", "id, property name, area, hotel"); Parameters.set ("fq", "cityname: \" "+ city name +" \ ""); Parameters.set ("wt", "json"); Parameters.set ("Rows", "600"); Parameters.set ("Indent", true);
If I use another filter query such as
parameters.set ("fq", "hotel: \" "+ hotel +" \ "") ;
shows its overwritten city and only hotels, need to show hotels from the city
I had a similar problem and here is the solution that I have applied to solve this issue:
parameters.addFilterQuery ("Hotel: "" + Hotel + "\" "," cityName: "+ cityName); Example: parameters.addFilterQuery ("Hotel: \" "+ Marriott +" \ "", "City name:" + Pune);
This question will show all the Marriott hotels from Pune city.
I hope you are seeing this.
Hope it helps! !!
Jayesh Bhoyar
Comments
Post a Comment