Hi,
i want my user to enter a (or several) searchword(s) and also a daterange. i'm building two querys like this:
Code:
for(int i = 0; i < words.length; i++){
if(words[i] instanceof String){
query = MultiFieldQueryParser.parse((String)words[i], fields, boolArr,new GermanAnalyzer());
queryList.add(query);
now i have all my querys in an array (queryList.toArray() returns Object[]). What i'm tryin to reach is now to merge all these queries in the array into one query like:
(query1) AND (query2) AND ... AND (queryN)
i already found the static method :
Code:
Query.mergeBooleanQueries(queryArray);
but this ORs all the querys which is not my intention. Also i already build the wanted query by myself within a string, but i just found
Code:
Fulltextsession.createQuery(String string)
but that returns a hibernate query.
Is there a way i can use this (or any other approach) to achieve my goal?