我是新來的冬眠搜索,我發現困難形成Hibernateserach查詢。 我需要使用IN操作符到List中的Hibernate查詢中的字符串。 任何人都可以幫我解決這個問題。 這裏我當前的查詢這個樣子的HibernateSearch查詢
String querystring="country:"+profile.getCountry()+" AND religion:"+profile.getReligion()+" AND caste:"+profile.getCaste()+" AND gender:"+profile.getGender()+"AND profession : "+professions+" AND age:["+profile.getFromage()+" TO "+profile.getToage()+"]" ;
是職業是字符串列表。
問候, 阿倫
嗨曼努埃爾感謝您的回覆。我正在創建一個lucene查詢字符串。我需要解析這些字符串,然後在內部Lucene查詢將處理選擇,從我使用的子句HibernateSearch完整的代碼如下所示 – user2029781
querystring工作正常,與下面的字符串String querystring =「country:」+ profile.getCountry )+「AND religion:」+ profile.getReligion()+「AND caste:」+ profile.getCaste()+「AND gender:」+ profile.getGender()+「AND age:[」+ profile.getFromage() +「TO」+ profile.getToage()+「]」;但是當我添加列表行業,它將無法工作謝謝阿倫 – user2029781
你可能想補充說,這是用於lucene的問題。我已將lucene標籤添加到您的問題中 –