Package in.partake.service

Examples of in.partake.service.EventSearchServiceException


        try {
            TopDocs docs = LuceneService.get().search("", category, "beginDate", true, maxDocument);
            return convertToIds(docs, 0);
        } catch (ParseException e) {
            assert false;
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here


    public List<String> search(String term, String category, String sortOrder, boolean beforeDeadlineOnly, int offset, int limit) throws EventSearchServiceException {
        try {
            TopDocs docs = LuceneService.get().search(term, category, sortOrder, beforeDeadlineOnly, offset + limit);
            return convertToIds(docs, offset);
        } catch (ParseException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

        try {
            TopDocs docs = LuceneService.get().search(term, category, sortOrder, beforeDeadlineOnly, maxDocument);
            return convertToIds(docs, 0);
        } catch (ParseException e) {
            assert false;
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

            return;

        try {
            instance.cleanUp();
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }

        instance = null;
    }
View Full Code Here

        try {
            indexWriter.addDocument(doc, analyzer);
            indexWriter.commit();
            reset();
        } catch (CorruptIndexException e) {
            throw new EventSearchServiceException(e);
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

        try {
            indexWriter.updateDocument(new Term("ID", doc.get("ID")), doc, analyzer);
            indexWriter.commit();
            reset();
        } catch (CorruptIndexException e) {
            throw new EventSearchServiceException(e);
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

        try {
            indexWriter.deleteDocuments(new Term("ID", id));
            indexWriter.commit();
            reset();
        } catch (CorruptIndexException e) {
            throw new EventSearchServiceException(e);
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

        try {
            Query query = new TermQuery(new Term("ID", id));
            TopDocs docs = indexSearcher.search(query, 1);
            return docs.totalHits > 0;
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

    public Document getDocument(int doc) throws EventSearchServiceException {
        try {
            return indexSearcher.doc(doc);
        } catch (CorruptIndexException e) {
            throw new EventSearchServiceException(e);
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

            Sort sort = new Sort(new SortField("CREATED-AT", SortField.STRING, true));

            return indexSearcher.search(query, null, n, sort);
        } catch (IOException e) {
            throw new EventSearchServiceException(e);
        }
    }
View Full Code Here

TOP

Related Classes of in.partake.service.EventSearchServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.