photospace.search
Class Searcher

java.lang.Object
  extended byphotospace.search.Searcher

public class Searcher
extends java.lang.Object


Field Summary
static int ASCENDING
           
static org.apache.lucene.search.Sort CREATED_ASCENDING
           
static org.apache.lucene.search.Sort CREATED_DESCENDING
           
static int DESCENDING
           
static org.apache.lucene.search.Query LOCATED_CONSTRAINT
           
static org.apache.lucene.search.Query PHOTO_CONSTRAINT
           
 
Constructor Summary
Searcher()
           
 
Method Summary
 Meta browse(java.lang.String path, int sort, int start, int end)
           
 Meta browse(java.lang.String path, org.apache.lucene.search.Query constraint, int sort, int start, int end)
           
 java.util.Collection getDocumentMatches(java.lang.String path)
          Retrieves a collection of Matches for a specific Meta path
 java.util.Collection getDocumentMatches(java.lang.String path, java.lang.String field)
          Retrieves a collection of Matches for a specific Meta path and field
 java.util.Collection getFieldMatches(java.lang.String field)
           
 java.util.Collection getFieldNames()
          Retrieves the set of field names from the index
 SearchResult search(java.lang.String query, int sort, int start, int end)
           
 SearchResult search(java.lang.String query, org.apache.lucene.search.Query constraint, int sort, int start, int end)
           
 void setIndex(SearchIndex index)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final int ASCENDING
See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
See Also:
Constant Field Values

CREATED_ASCENDING

public static final org.apache.lucene.search.Sort CREATED_ASCENDING

CREATED_DESCENDING

public static final org.apache.lucene.search.Sort CREATED_DESCENDING

PHOTO_CONSTRAINT

public static final org.apache.lucene.search.Query PHOTO_CONSTRAINT

LOCATED_CONSTRAINT

public static final org.apache.lucene.search.Query LOCATED_CONSTRAINT
Constructor Detail

Searcher

public Searcher()
Method Detail

browse

public Meta browse(java.lang.String path,
                   int sort,
                   int start,
                   int end)
            throws java.io.IOException
Throws:
java.io.IOException

browse

public Meta browse(java.lang.String path,
                   org.apache.lucene.search.Query constraint,
                   int sort,
                   int start,
                   int end)
            throws java.io.IOException
Throws:
java.io.IOException

getFieldNames

public java.util.Collection getFieldNames()
                                   throws java.io.IOException
Retrieves the set of field names from the index

Throws:
java.io.IOException

getDocumentMatches

public java.util.Collection getDocumentMatches(java.lang.String path)
                                        throws java.io.IOException
Retrieves a collection of Matches for a specific Meta path

Throws:
java.io.IOException

getDocumentMatches

public java.util.Collection getDocumentMatches(java.lang.String path,
                                               java.lang.String field)
                                        throws java.io.IOException
Retrieves a collection of Matches for a specific Meta path and field

Throws:
java.io.IOException

getFieldMatches

public java.util.Collection getFieldMatches(java.lang.String field)
                                     throws java.io.IOException
Throws:
java.io.IOException

search

public SearchResult search(java.lang.String query,
                           int sort,
                           int start,
                           int end)
                    throws org.apache.lucene.queryParser.ParseException,
                           java.io.IOException
Throws:
org.apache.lucene.queryParser.ParseException
java.io.IOException

search

public SearchResult search(java.lang.String query,
                           org.apache.lucene.search.Query constraint,
                           int sort,
                           int start,
                           int end)
                    throws org.apache.lucene.queryParser.ParseException,
                           java.io.IOException
Throws:
org.apache.lucene.queryParser.ParseException
java.io.IOException

setIndex

public void setIndex(SearchIndex index)