Changeset 6469 for TI01-discovery-API


Ignore:
Timestamp:
02/02/10 15:14:58 (9 years ago)
Author:
mnagni
Message:

Updated the regexpr which undergoes the query parsing

Location:
TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/medin/Utilities.java

    r6461 r6469  
    249249        } 
    250250         
     251        /** 
     252         * Returns the {@link DiscoveryDictionary.RecordDetailList} proper element 
     253         * for the given parameter. In the paramenter is <code>null</code> or 
     254         * not found the default value {@link DiscoveryDictionary.RecordDetailList#DocumentId}} 
     255         * is returned 
     256         * @param detailType the name of the required detailType. 
     257         * @return the proper {@link DiscoveryDictionary.RecordDetailList} or the default value  
     258         * */ 
    251259        public static RecordDetailList getRecordDetails(String detailType){ 
    252260                DiscoveryDictionary.RecordDetailList type = DiscoveryDictionary.RecordDetailList.DocumentId; 
  • TI01-discovery-API/trunk/MEDINDiscoveryService/src/main/java/ndg/services/discovery/model/SearchAgent.java

    r6468 r6469  
    287287                // joins 
    288288                //term = term.replaceAll("([\\w\\(\\)])(\\s+)([!\\w\\(\\)])", "$1 & $3"); 
    289                 term = term.replaceAll("(\\bAND\\b)|(\\band\\b)", "&"); 
    290                 term = term.replaceAll("(\\bOR\\b)|(\\bor\\b)", "|"); 
    291                 term = term.replaceAll("(\\bNOT\\b)|(\\bnot\\b)", "!"); 
     289                term = term.replaceAll("(\\bAND\\b)|(\\band\\b)|\\+", "&"); 
     290                term = term.replaceAll("(\\bOR\\b)|(\\bor\\b)|\\|", "|"); 
     291                term = term.replaceAll("(\\bNOT\\b)|(\\bnot\\b)\\-", "!"); 
    292292                fromSQL.append(", to_tsquery('" + term + "') AS query "); 
    293293                 
Note: See TracChangeset for help on using the changeset viewer.