| 
															
																@ -194,48 +194,48 @@ public class TextSearchEndPoint extends EnvelopRestEndPoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        continue; 
															 | 
															
															 | 
															
																                        continue; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } else { 
															 | 
															
															 | 
															
																                    } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        start = ch; 
															 | 
															
															 | 
															
																                        start = ch; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        otherString = keys.substring(i+1,keys.length()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        otherString = keys.substring(i + 1, keys.length()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } 
															 | 
															
															 | 
															
																                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                //以"开头  ,查找后面是否有 " ,有则截取 
															 | 
															
															 | 
															
																                //以"开头  ,查找后面是否有 " ,有则截取 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                if ("\"".equals(start)){ 
															 | 
															
															 | 
															
																                if ("\"".equals(start)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    int fhIndex = otherString.indexOf("\""); 
															 | 
															
															 | 
															
																                    int fhIndex = otherString.indexOf("\""); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    if (fhIndex > -1){ 
															 | 
															
															 | 
															
																                    if (fhIndex > -1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        temp = keys.substring(i+1,i+fhIndex+1); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        temp = keys.substring(i + 1, i + fhIndex + 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        if (!"or".equalsIgnoreCase(preString)){ 
															 | 
															
															 | 
															
																                        if (!"or".equalsIgnoreCase(preString)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            q = builderAndQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            q = builderAndQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } else { 
															 | 
															
															 | 
															
																                        } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            q = builderOrQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            q = builderOrQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } 
															 | 
															
															 | 
															
																                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        i = fhIndex+i+1; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        i = fhIndex + i + 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        start = ""; 
															 | 
															
															 | 
															
																                        start = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        preString = temp; 
															 | 
															
															 | 
															
																                        preString = temp; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } else { 
															 | 
															
															 | 
															
																                    } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        int kgIndex = otherString.indexOf(" "); 
															 | 
															
															 | 
															
																                        int kgIndex = otherString.indexOf(" "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        if (kgIndex > -1){ 
															 | 
															
															 | 
															
																                        if (kgIndex > -1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            temp = keys.substring(i,i+kgIndex+1); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            temp = keys.substring(i, i + kgIndex + 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
															
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderAndQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                q = builderAndQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            } else { 
															 | 
															
															 | 
															
																                            } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderOrQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                q = builderOrQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            } 
															 | 
															
															 | 
															
																                            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            i = kgIndex+i+1; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            i = kgIndex + i + 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            start = ""; 
															 | 
															
															 | 
															
																                            start = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            preString = temp; 
															 | 
															
															 | 
															
																                            preString = temp; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } else { 
															 | 
															
															 | 
															
																                        } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            temp = start+otherString; 
															 | 
															
															 | 
															
																                            temp = start+otherString; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
															
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderAndQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                q = builderAndQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            } else { 
															 | 
															
															 | 
															
																                            } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderOrQuery(temp,q); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                                q = builderOrQuery(temp, q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            } 
															 | 
															
															 | 
															
																                            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            i= keys.length(); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                            i = keys.length(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } 
															 | 
															
															 | 
															
																                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } 
															 | 
															
															 | 
															
																                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } else { 
															 | 
															
															 | 
															
																                } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    int kgIndex = otherString.indexOf(" "); 
															 | 
															
															 | 
															
																                    int kgIndex = otherString.indexOf(" "); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    if (kgIndex > -1){ 
															 | 
															
															 | 
															
																                    if (kgIndex > -1){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        temp = keys.substring(i,i+kgIndex+1); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        temp = keys.substring(i, i + kgIndex + 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        if (!"and".equalsIgnoreCase(temp) &&  !"or".equalsIgnoreCase(temp)){ 
															 | 
															
															 | 
															
																                        if (!"and".equalsIgnoreCase(temp) &&  !"or".equalsIgnoreCase(temp)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
															
															 | 
															
																                            if (!"or".equalsIgnoreCase(preString)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderAndQuery(temp,q); 
															 | 
															
															 | 
															
																                                q = builderAndQuery(temp,q); 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -243,7 +243,7 @@ public class TextSearchEndPoint extends EnvelopRestEndPoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                                q = builderOrQuery(temp,q); 
															 | 
															
															 | 
															
																                                q = builderOrQuery(temp,q); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                            } 
															 | 
															
															 | 
															
																                            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        } 
															 | 
															
															 | 
															
																                        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        i=kgIndex+i+1; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        i = kgIndex + i + 1; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        start = ""; 
															 | 
															
															 | 
															
																                        start = ""; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        preString = temp; 
															 | 
															
															 | 
															
																                        preString = temp; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } else { 
															 | 
															
															 | 
															
																                    } else { 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -284,9 +284,9 @@ public class TextSearchEndPoint extends EnvelopRestEndPoint { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                substring = ClientUtils.escapeQueryChars(substring); 
															 | 
															
															 | 
															
																                substring = ClientUtils.escapeQueryChars(substring); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                if (StringUtils.isNotBlank(substring)){ 
															 | 
															
															 | 
															
																                if (StringUtils.isNotBlank(substring)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    if (StringUtils.isBlank(q)){ 
															 | 
															
															 | 
															
																                    if (StringUtils.isBlank(q)){ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        q += ResourceCells.SEARCH_FIELD + ":" + temp.substring(1,temp.length()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        q += ResourceCells.SEARCH_FIELD + ":" + temp.substring(1, temp.length()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } else { 
															 | 
															
															 | 
															
																                    } else { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                        q +=" AND " + ResourceCells.SEARCH_FIELD + ":" + temp.substring(1,temp.length()); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																                        q += " AND " + ResourceCells.SEARCH_FIELD + ":" + temp.substring(1, temp.length()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                    } 
															 | 
															
															 | 
															
																                    } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                } 
															 | 
															
															 | 
															
																                } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            } else { 
															 | 
															
															 | 
															
																            } else { 
															 |