Project

General

Profile

« Previous | Next » 

Revision 7716

Added by Jing Tao almost 11 years ago

Remove the depency on the d1_cn_index_processor.

View differences:

HttpSolrQueryService.java
37 37
import org.apache.commons.logging.Log;
38 38
import org.apache.commons.logging.LogFactory;
39 39
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
40
import org.apache.solr.client.solrj.util.ClientUtils;
40 41

  
41 42
import org.apache.solr.common.params.SolrParams;
42 43
import org.apache.solr.schema.SchemaField;
43
import org.dataone.cn.indexer.solrhttp.HTTPService;
44
import org.dataone.cn.indexer.solrhttp.SolrDoc;
45 44
import org.dataone.service.exceptions.NotFound;
46 45
import org.dataone.service.exceptions.NotImplemented;
47 46
import org.dataone.service.types.v1.Subject;
......
85 84
        StringBuffer accessFilter = generateAccessFilterParamsString(subjects);
86 85
        if(accessFilter != null && accessFilter.length() != 0) {
87 86
            query = solrServerBaseURL+"/select?"+query+"&"+FILTERQUERY+"="+accessFilter.toString();
88
            query = HTTPService.escapeQueryChars(query);
87
            query = ClientUtils.escapeQueryChars(query);
89 88
        } else {
90 89
            throw new NotFound("0000", "HttpSolrQueryService.query - There is no identity (even user public) for the user who issued the query");
91 90
        }
......
108 107
    }
109 108
    
110 109
    
111
    /**
112
     * Get the list of SolrDocs for the specified ids from the solr server.
113
     *  * Note: each id only can have one SolrDoc or null SolrDoc. If it is null, it
114
     * wouldn't be added to the list.
115
     * @param ids the specified ids
116
     * @return the SolrDocs of the ids.
117
     * @throws Exception
118
     */
119
    public  List<SolrDoc> query(List<String> ids) throws Exception {
120
        return null;
121
    }
122 110
    
123 111
    
124 112
    /**
......
137 125
    public String getSolrServerVersion() {
138 126
        return null;
139 127
    }
128
    
129
 
140 130
}

Also available in: Unified diff