Code Search for Developers
 
 
  

I_SearchSession.java from Kneobase at Krugle


Show I_SearchSession.java syntax highlighted

/*
 * Created on 12/08/2004
 *
 */
package com.kneobase.search;

import java.io.IOException;
import java.util.Set;

import com.kneobase.search.query.*;
import com.kneobase.search.query.Filter;
import com.kneobase.search.query.Query;
import com.kneobase.search.query.QueryException;

/**
 * @author Ernesto De Santis
 *
 */
public interface I_SearchSession {
    
    //Search Methods
	
	/**
	 * Returns the documents matching query
	 * 
	 * @param query kneobase query
	 */
    public Hits search(Query query) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query and filter.
	 * 
	 * @param query kneobase query
	 * @param filter kneobase filter
	 */
    public Hits search(Query query, Filter filter) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query and source.
	 * 
	 * @param query kneobase query
	 * @param source restrict results at this source
	 */
	public Hits search(Query query, String source) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query and one of sources.
	 * 
	 * @param query kneobase query
	 * @param sources restrict results at this sources
	 */
    public Hits search(Query query, String[] sources) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query, one of sources, and one of languages.
	 * 
	 * @param query kneobase query
	 * @param sources restrict results at this sources
	 * @param languages restrict results at this languages
	 */
    public Hits search(Query query, String[] sources, String[] languages) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query, source and language.
	 * 
	 * @param query kneobase query
	 * @param source restrict results at this source
	 * @param language restrict results at this language
	 */
    public Hits search(Query query, String source, String language) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query, filter, one of sources and one of languages.
	 * 
	 * @param query kneobase query
	 * @param filter kneobase filter
	 * @param sources restrict results at this sources
	 */
	public Hits search(Query query, Filter filter, String[] sources) throws QueryException, SearchException, IOException ;

	/**
	 * Returns the documents matching query, filter, source and language.
	 * 
	 * @param query kneobase query
	 * @param filter kneobase filter
	 * @param source restrict results at this source
	 * @param language restrict results at this language
	 */
	public Hits search(Query query, Filter filter, String source, String language) throws QueryException, SearchException, IOException ;
    
	/**
	 * Returns the documents matching query, filter, one of sources and one of languages.
	 * 
	 * @param query kneobase query
	 * @param filter kneobase filter
	 * @param sources restrict results at this sources
	 * @param languages restrict results at this languages
	 */
	public Hits search(Query query, Filter filter, String[] sources, String[] languages) throws QueryException, SearchException, IOException ;

    //TODO: support sorting 
    //public Hits search(Query query, Filter filter, String[] sources, String[] languages, Sort sort) throws QueryException, IOException ;

    //info for search Methods
    
    /**
     * Return availables sources in index.
     * @return set of sources names (Set of String)
     */
    public Set getSources();

    public Set getCategories();

    public Set getCategories(String source);
    
    //TODO rename to getFieldNames
    public Set getFields();
    
    //TODO rename to getFieldNames
    public Set getFields(String source);
    
    /**
     * IndexManager languages supported.
     * 
     * @return Languages String Collection 
     */
    public Set getLanguages();
    
    /**
     * languages in source
     * 
     * @param source id source 
     * @return Languages String Collection
     */
   // public Set getLanguages(String source);

}




See more files for this project here

Kneobase

Kneobase is an enterprise search engine, based upon the Lucene search engine and the Spring framework. It allows to perform full-text search across many different content sources. It is highly adaptable out-of-the-box and has a pluggable architecture.

Project homepage: http://sourceforge.net/projects/kneobase
Programming language(s): Java,XML
License: other

  query/
    BooleanClause.java
    BooleanQuery.java
    CategoryFilter.java
    FieldFilter.java
    Filter.java
    FullTextQuery.java
    HighlighterConfiguration.java
    Hits.java
    LanguageFilter.java
    LuceneHitsContainer.java
    MultiFilter.java
    NaturalQuery.java
    Query.java
    QueryException.java
    QueryFilter.java
    SourceFilter.java
    Term.java
    TermQuery.java
    UnsupportedLanguageException.java
    WildcardQuery.java
  I_SearchSession.java
  SearchException.java
  TooManyClausesException.java