source: vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/solr/SolrDocumentQueryFactory.java @ 4661

Last change on this file since 4661 was 4661, checked in by Twan Goosen, 10 years ago

Package structure: separated solr services from other services and moved all panels into new wicket.panels package

File size: 1.8 KB
Line 
1/*
2 * Copyright (C) 2014 CLARIN
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17package eu.clarin.cmdi.vlo.service.solr;
18
19import eu.clarin.cmdi.vlo.FacetConstants;
20import eu.clarin.cmdi.vlo.pojo.QueryFacetsSelection;
21import org.apache.solr.client.solrj.SolrQuery;
22
23/**
24 *
25 * @author twagoo
26 */
27public interface SolrDocumentQueryFactory {
28
29    /**
30     * Creates a query to retrieve all document that match a query/facet
31     * selection with an offset and limit
32     *
33     * @param selection selection criteria
34     * @param first search result offset
35     * @param count limits the number of results
36     * @return a query set up to retrieve the matching documents, starting with
37     * the specified starting index and limited to the specified count
38     */
39    SolrQuery createDocumentQuery(QueryFacetsSelection selection, int first, int count);
40
41    /**
42     * Creates a query to retrieve a single document by id
43     *
44     * @param docId identifier of document to retrieve
45     * @return a query set up to retrieve one row at most with the document that
46     * has the specified identifier
47     * @see FacetConstants#FIELD_ID
48     */
49    SolrQuery createDocumentQuery(String docId);
50
51}
Note: See TracBrowser for help on using the repository browser.