org.musicontroller.core.searching
Class MCSearcher

java.lang.Object
  extended by org.musicontroller.core.searching.MCSearcher
All Implemented Interfaces:
ISearcher

public class MCSearcher
extends java.lang.Object
implements ISearcher

The Searcher is an object that is used for querying the Lucene-index that is maintained by the Indexer.

Version:
$Id: MCSearcher.java,v 1.1 2010/03/16 18:55:42 varienaja Exp $
Author:
arjanverstoep
See Also:
Indexer

Constructor Summary
MCSearcher()
           
 
Method Summary
 java.util.List<Item> searchGeneral(java.lang.String username, java.lang.String toSearch)
          Searches an Index for Items.
 java.util.List<java.lang.String> searchTopSongsForKeyword(java.lang.String username, java.lang.String keyword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCSearcher

public MCSearcher()
Method Detail

searchTopSongsForKeyword

public java.util.List<java.lang.String> searchTopSongsForKeyword(java.lang.String username,
                                                                 java.lang.String keyword)

searchGeneral

public java.util.List<Item> searchGeneral(java.lang.String username,
                                          java.lang.String toSearch)
                                   throws java.io.IOException,
                                          org.apache.lucene.queryParser.ParseException
Description copied from interface: ISearcher
Searches an Index for Items.

Specified by:
searchGeneral in interface ISearcher
Parameters:
username - The username. Use this to obtain user-specific search results. This parameter may be null.
toSearch - The search-string.
Returns:
A list ith 0 or more Items, ordered by relevance (most relevant on top).
Throws:
java.io.IOException - If the index could not be consulted.
org.apache.lucene.queryParser.ParseException - If the search-string could not be parsed.


Copyright © 2010 A.J.V.. All Rights Reserved.