|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.search.DSQuery
public class DSQuery
DSIndexer contains various static methods for performing queries on indices, for collections and communities.
| Constructor Summary | |
|---|---|
DSQuery()
|
|
| Method Summary | |
|---|---|
static void |
close()
Close any IndexSearcher that is currently open. |
static void |
doCMDLineQuery(String query)
Do a query, printing results to stdout largely for testing, but it is useful |
static QueryResults |
doQuery(Context c,
QueryArgs args)
Do a query, returning a QueryResults object |
static QueryResults |
doQuery(Context c,
QueryArgs args,
Collection coll)
Do a query, restricted to a collection |
static QueryResults |
doQuery(Context c,
QueryArgs args,
Community comm)
Do a query, restricted to a community |
protected static org.apache.lucene.index.IndexReader |
getIndexReader()
get an IndexReader. |
protected static org.apache.lucene.search.IndexSearcher |
getSearcher(Context c)
get an IndexSearcher, hopefully a cached one (gives much better performance.) checks to see if the index has been modified - if so, it creates a new IndexSearcher |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DSQuery()
| Method Detail |
|---|
public static QueryResults doQuery(Context c,
QueryArgs args)
throws IOException
c - contextargs - query arguments in QueryArgs object
IOException
public static QueryResults doQuery(Context c,
QueryArgs args,
Collection coll)
throws IOException
c - contextargs - query argscoll - collection to restrict to
IOException
public static QueryResults doQuery(Context c,
QueryArgs args,
Community comm)
throws IOException
c - contextargs - query argscomm - community to restrict to
IOExceptionpublic static void doCMDLineQuery(String query)
public static void close()
public static void main(String[] args)
protected static org.apache.lucene.index.IndexReader getIndexReader()
throws IOException
IOException
protected static org.apache.lucene.search.IndexSearcher getSearcher(Context c)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||