|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.binaryfantasy.murq.search.ContentIndex
public class ContentIndex
ContentIndex encapsulates the indexing and searching of
content persisted by Murq using Apache Lucene.
FOR INTERNAL USE ONLY.
| Constructor Summary | |
|---|---|
ContentIndex(MurqSource src)
Constructs a new ContentIndex object, either from data in
the specified src or creating new index data. |
|
| Method Summary | |
|---|---|
void |
add(ContentIndex index)
Adds the index data from the specified index to this
ContentIndex. |
void |
add(IContent content)
Adds indexing information from the provided content to
the index, removing and previous index data associated with it. |
Set<IContent> |
find(MurqQuery query)
Performs a search of all content and returns a Set of
matching content, or an empty Set if no matches are
found. |
org.apache.lucene.search.Hits |
find(org.apache.lucene.search.Query query)
Performs a search of all content and returns Lucene Hits
of matching content. |
IContent |
findRandom(MurqQuery query)
Returns a single, random IContent
from the results returned from the specified query, or
null if no matches are found. |
Set<SourceKey> |
findSourceKeys(MurqQuery query)
Performs a search of all content and returns a Set of
SourceKeys of matching content,
or an empty Set if no matches are found. |
void |
remove(SourceKey key)
Removes index data about the content associated with the specified key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContentIndex(MurqSource src)
ContentIndex object, either from data in
the specified src or creating new index data.
src - the MurqSource used for persistance.| Method Detail |
|---|
public IContent findRandom(MurqQuery query)
IContent
from the results returned from the specified query, or
null if no matches are found.
query - defines the search, from which the random result will be
selected.
IContent
from the results returned from the specified query,
or null if no matches are found.public Set<IContent> find(MurqQuery query)
Set of
matching content, or an empty Set if no matches are
found.
query - defines the search terms.
Set if no
matches are found.
IllegalArgumentException - if the queryStr is null or if
it cannot be parsed.
IllegalStateException - if this Murq instance is closed.public Set<SourceKey> findSourceKeys(MurqQuery query)
Set of
SourceKeys of matching content,
or an empty Set if no matches are found.
query - defines the search terms.
SourceKeys of
matching content, or an empty Set if no
matches are found.
IllegalArgumentException - if the query is null.public org.apache.lucene.search.Hits find(org.apache.lucene.search.Query query)
Hits
of matching content.
query - defines the search terms.
Hits of matching content.
IllegalArgumentException - if the query is null.public void add(IContent content)
content to
the index, removing and previous index data associated with it.
content - the content to be indexed.public void remove(SourceKey key)
key.
key - the SourceKey
associated with the content.public void add(ContentIndex index)
index to this
ContentIndex.
index - the ContentIndex containing the data to be
added.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||