|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.endeca.navigation.ESearchReport
public class ESearchReport
ESearchReport objects contain detailed information about record searches.
Use Navigation.getESearchReports() to obtain
a Map of ESearchReport objects.
A single ESearchReport object contains information about a single search
key. If a query is submitted to the Endeca MDEX Engine with multiple keys,
Navigation.getESearchReports() will return a Map
that contains an ESearchReport object for each search key that was submitted.
For example, in this query:
N=0&Ntk=Name|Flavors&Ntt=merlot|fruity
the resulting Map will have two entries, one for each search key.
| Nested Class Summary | |
|---|---|
static class |
ESearchReport.Mode
Enumeration of Endeca search modes. |
| Field Summary | |
|---|---|
static ESearchReport.Mode |
MODE_ALL
Match all user search terms (i.e., perform a conjunctive search). |
static ESearchReport.Mode |
MODE_ALL_ANY
Match all user search terms if possible, otherwise match at least one. |
static ESearchReport.Mode |
MODE_ALL_PARTIAL
Match all user search terms if possible, otherwise match some. |
static ESearchReport.Mode |
MODE_ANY
Match at least one user search term. |
static ESearchReport.Mode |
MODE_BOOLEAN
Match using a Boolean query. |
static ESearchReport.Mode |
MODE_PARTIAL
Match some user search terms. |
static ESearchReport.Mode |
MODE_PARTIAL_MAX
Match a maximal subset of user search terms. |
static ESearchReport.Mode |
MODE_UNKNOWN
The mode is unknown. |
| Method Summary | |
|---|---|
List |
getAutoSuggestions()
Returns the list of automatic spelling corrections and/or alternative phrasing suggestions made by the Endeca MDEX Engine. |
List |
getDYMSuggestions()
Returns the list of "Did You Mean" suggestions made by the Endeca MDEX Engine. |
String |
getErrorMessage()
Returns the MDEX Engine's error message if the search was not valid. |
String |
getKey()
Returns the key used in the record search. |
ESearchReport.Mode |
getMatchedMode()
Returns the matched search mode that was selected by the MDEX Engine. |
ESearchReport.Mode |
getMode()
Returns the requested search mode used in the search. |
long |
getNumMatchedTerms()
Returns the number of search terms that were sucessfully matched when the search was performed. |
long |
getNumMatchingResults()
Returns the number of records that matched the search. |
String |
getTerms()
Returns the terms specified in the record search. |
String |
getTruncatedTerms()
Returns a set of search terms after truncation. |
PropertyMap |
getWordInterps()
Returns the word interpretations for the record search. |
boolean |
isValid()
Returns true if the search was a valid search. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ESearchReport.Mode MODE_ALL
public static final ESearchReport.Mode MODE_ANY
public static final ESearchReport.Mode MODE_PARTIAL
public static final ESearchReport.Mode MODE_PARTIAL_MAX
public static final ESearchReport.Mode MODE_BOOLEAN
public static final ESearchReport.Mode MODE_ALL_ANY
public static final ESearchReport.Mode MODE_ALL_PARTIAL
public static final ESearchReport.Mode MODE_UNKNOWN
| Method Detail |
|---|
public String getKey()
Ntk parameter
of a UrlENEQuery.
String containing the search key, or null if
no key has been specified.public String getTerms()
Ntt parameter of a
UrlENEQuery. If the query was truncated for performance reasons,
use getTruncatedTerms to get the truncated terms.
String containing the terms specified in the search, or null
if no terms have been specified.public ESearchReport.Mode getMode()
Ntk
parameter of a UrlENEQuery.
ESearchReport.Modepublic ESearchReport.Mode getMatchedMode()
getMode()
in that getMatchedMode returns the match mode that was actually
selected by the MDEX Engine as opposed to the match mode that was
requested in the query.For example, assume that the following query was issued to the MDEX Engine:
N=0&Ntk=all&Ntt=merlot+blackberry&Ntx=mode+matchallany
The query is searching for the terms merlot and blackberry and is
requesting the match mode of MODE_ALL_ANY. This search mode will first attempt to perform a
search that matches all of the terms; failing that, it will perform a
search that matches any of the terms. Assuming there are no occurrences of
blackberry, the resulting match mode will be MODE_ANY.
MODE_ALL,
MODE_ANYpublic long getNumMatchingResults()
Navigation.getTotalNumERecs() method.
public PropertyMap getWordInterps()
For example, assume the index contains the following thesaurus entry:
cab > cabernet
If a search is performed for the term "cab" and there is a match for
"cabernet", a single word interpretation will be returned with the key
"cab" and a value of "cabernet".
In the Automatic Phrasing feature, for each contiguous subsequence of query terms that was treated as a quoted phrase during search processing, a word interpretation will be returned with the original query terms as the key and the query terms in double quotes as the value.
Note that the MDEX Engine's --wordinterp flag must be used
to obtain any results from getWordInterps.
PropertyMap representing the set of word interpretations.public List getAutoSuggestions()
Alternative phrasing suggestions are used by the MDEX Engine as the query to compute the set of matching documents returned instead of the user's original search query. Alternative phrasing suggestions can be returned under one of the following scenarios:
--spl command line flag.ENEQuery.setNavERecSearchComputeAlternativePhrasings(boolean)
method AND the ENEQuery.setNavERecSearchRewriteQueryWithAnAlternativePhrasing(boolean) method
is used to request that the MDEX Engine rewrite the query
using one of the alternatives it has computed.An example of having both Spelling Correction and Automatic Phrasing is if a user's query of:
QUERY[New Yorkk restaurants]
is rewritten to an alternative phrasing suggestion of:
QUERY["New York" restaurants]
Here the term "Yorkk" was spell-corrected to "York" and the resulting terms
"New" and "York" were suggested to be phrased by the Endeca MDEX Engine as "New York".
Only those suggestions that, when issued as queries, would return one or more
records (before any navigation filters are applied) will be returned.
List collection of ESearchAutoSuggestion objects. If there are
no suggestions, the list will be empty. You can use the
Java List.isEmpty() method to find out if the list contains any elements.ENEQuery.setNavERecSearchComputeAlternativePhrasings(boolean),
ENEQuery.getNavERecSearchComputeAlternativePhrasings(),
ENEQuery.setNavERecSearchRewriteQueryWithAnAlternativePhrasing(boolean),
ENEQuery.getNavERecSearchRewriteQueryWithAnAlternativePhrasing(),
getDYMSuggestions()public List getDYMSuggestions()
--dym command line flag.ENEQuery.setNavERecSearchComputeAlternativePhrasings(boolean) method.
If an alternative phrasing suggestion (auto suggestion) was made and used by
the MDEX Engine to replace the end user's original record search query,
it is possible that the end user's original record search query will be returned
as an ESearchDYMSuggestion by this method.An example of having both Spelling Correction and Automatic Phrasing is if a user's query of:
QUERY[New Yorkk restaurants]
is rewritten to an alternative phrasing suggestion of:
QUERY["New York" restaurants]
Here the term "Yorkk" was spell corrected to "York" and the resulting terms
"New" and "York" were suggested to be phrased by the MDEX Engine as "New York".
Only those suggestions that, when issued as queries, would return one or more
records (before any navigation filters are applied) will be returned.
List collection containing ESearchDYMSuggestion objects. If there are
no "Did You Mean" suggestions, the list will be empty. You can use the
Java List.isEmpty() method to find out if the list contains any elements.ENEQuery.setNavERecSearchComputeAlternativePhrasings(boolean),
ENEQuery.getNavERecSearchComputeAlternativePhrasings(),
ENEQuery.setNavERecSearchRewriteQueryWithAnAlternativePhrasing(boolean),
ENEQuery.getNavERecSearchRewriteQueryWithAnAlternativePhrasing(),
getAutoSuggestions()public String getErrorMessage()
String representing the error message, or null
if there is no error.public boolean isValid()
true if the search was a valid search.
If isValid returns false, check the value of getErrorMessage() for
a description of the error.
true if the search was a valid search, false otherwise.public long getNumMatchedTerms()
getTerms() if the search
mode was MODE_ANY.
public String getTruncatedTerms()
getTruncatedTerms returns the new set of search terms after the MDEX Engine
has performed the truncation.
String representing the truncated search terms, or null
if no truncation was performed.getTerms()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||