|
@ -74,17 +74,16 @@ public class ProfileSearchService extends BaseJpaService<HotWord,HotWordDao> {
|
|
if(StringUtils.isNotBlank(keys)){
|
|
if(StringUtils.isNotBlank(keys)){
|
|
Matcher m = p.matcher(keys);
|
|
Matcher m = p.matcher(keys);
|
|
while(m.find()){
|
|
while(m.find()){
|
|
list.add(m.group());
|
|
|
|
|
|
String group = m.group();
|
|
|
|
list.add(group.replace("\"",""));
|
|
}
|
|
}
|
|
for(String key:list){
|
|
for(String key:list){
|
|
keys = keys.replace(key,"");
|
|
|
|
|
|
keys = keys.replace("\""+key+"\"","");
|
|
}
|
|
}
|
|
String[] keyArray = keys.split(" ");
|
|
String[] keyArray = keys.split(" ");
|
|
for(String key:keyArray){
|
|
for(String key:keyArray){
|
|
if(StringUtils.isNotBlank(key) && !"or".equalsIgnoreCase(key) && !"and".equalsIgnoreCase(key)){
|
|
if(StringUtils.isNotBlank(key) && !"or".equalsIgnoreCase(key) && !"and".equalsIgnoreCase(key)){
|
|
if(key.startsWith("\"") && key.endsWith("\"")){
|
|
|
|
key = key.substring(1,key.length()-1);
|
|
|
|
}else if(key.startsWith("+") || key.startsWith("-")){
|
|
|
|
|
|
if(key.startsWith("+") || key.startsWith("-")){
|
|
key = key.substring(1);
|
|
key = key.substring(1);
|
|
}
|
|
}
|
|
list.add(key);
|
|
list.add(key);
|