1
如何在Mysql下面轉換爲solr? 我嘗試使用solr連接來實現它,但我不知道如何在通過IN Query的solr連接中使用多個條件。如何使用IN查詢在solr連接中執行多個條件?
SELECT *
FROM rooms
WHERE
departure_g_date = "2016-08-04T00:00:00Z"
AND returning_g_date = "2016-08-05T00:00:00Z"
AND (room_adults_child = '1-0' OR (room_adults_child = '2-1' AND child_age = 1))
AND hotel_id IN (
SELECT hotel_id
FROM rooms
WHERE
departure_g_date = "2016-08-04T00:00:00Z"
AND returning_g_date = "2016-08-05T00:00:00Z"
AND room_adults_child = '1-0'
)
AND hotel_id IN (
SELECT hotel_id
FROM rooms
WHERE
departure_g_date = "2016-08-04T00:00:00Z"
AND returning_g_date = "2016-08-05T00:00:00Z"
AND room_adults_child = '2-1'
)
您可能會發現這個(相當陳舊的)演示文稿有助於理解爲什麼我建議代表與Solr對象不同級別的信息:http://www.slideshare.net/trenaman/personalized-search-on-the-largest-flash美國銷售網站(幻燈片39是重點) –