public HotelStaticInfo QueryById(int id, string coreName) { var hotelStaticInfo = new HotelStaticInfo(); var solrQueryResults = SolrApi.Query <HotelSolrModel>("id:" + id, null, coreName); foreach (var solrQueryResult in solrQueryResults) { hotelStaticInfo = JsonHelper.DeserializeJsonToObject <HotelStaticInfo>(solrQueryResult.Value); } return(hotelStaticInfo); }
public IList <KeyWordHotel> GetKeyWordHotel(int cityCode) { return(SolrApi.Query <KeyWordHotel>("citycode:" + cityCode, null, "testsolr2").Select(c => new KeyWordHotel { HotelId = c.HotelId, HotelName = c.HotelName, CityName = c.CityName, CityCode = c.CityCode, AreaName = c.AreaName, AreaCode = c.AreaCode, BusinessDistrict = c.BusinessDistrict, HotelBrandName = c.HotelBrandName, HotelBrandCode = c.HotelBrandCode }).ToList()); }
public SolrQueryResults <HotelOriginalInfoSolrModel> GetHotelById(string hotelId, QueryOptions op) { return(SolrApi.Query <HotelOriginalInfoSolrModel>("id:" + hotelId, op, "originalhotel")); }
public SolrQueryResults <HotelOriginalInfoSolrModel> GetHotelOriginal(string cityCode, QueryOptions op) { return(SolrApi.Query <HotelOriginalInfoSolrModel>("*:*", op, "originalhotel")); }
public SolrQueryResults <HotelSimpleInfoSolrModel> GetHotelSimple(string cityCode, QueryOptions op) { return(SolrApi.Query <HotelSimpleInfoSolrModel>("*:*", op, "hotelsimple")); }