1 package org.musicontroller.core.searching; 2 3 import java.io.IOException; 4 import java.util.List; 5 6 import org.apache.lucene.queryParser.ParseException; 7 8 /** 9 * Specifies all methods for a Searcher. This interface is a high-leven specification 10 * of a service that can do a full-index-search in a DB/index/whatever. 11 * @author Varienaja 12 */ 13 public interface ISearcher { 14 15 /** 16 * Searches an Index for Items. 17 * @param username The username. Use this to obtain user-specific 18 * search results. This parameter may be null. 19 * @param toSearch The search-string. 20 * @return A list ith 0 or more Items, ordered by relevance (most relevant on top). 21 * @throws IOException If the index could not be consulted. 22 * @throws ParseException If the search-string could not be parsed. 23 */ 24 public List<Item> searchGeneral(String username, String toSearch) throws IOException, ParseException; 25 26 }