我是新来的冬眠搜索,我发现困难形成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标签添加到您的问题中 –