. Advanced Search improvements

. Fix to Lucene Indexer (from Andy) to correct the bug where if content was not indexed (e.g. JPEG) then it's mimetype/size values did not get added to the index.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2107 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-01-13 13:21:29 +00:00
parent aaff54e53c
commit 56eb3d75b9
5 changed files with 285 additions and 249 deletions

View File

@@ -578,9 +578,12 @@ public class BrowseBean implements IContextListener
if (logger.isDebugEnabled())
startTime = System.currentTimeMillis();
// special exit case for < 3 characters in length
if (searchContext.getText().length() < getMinimumSearchLength())
// get the searcher object to build the query
String query = searchContext.buildQuery(getMinimumSearchLength());
if (query == null)
{
// failed to build a valid query, the user probably did not enter the
// minimum text required to construct a valid search
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), MSG_SEARCH_MINIMUM),
new Object[] {getMinimumSearchLength()}));
this.containerNodes = Collections.<Node>emptyList();
@@ -588,9 +591,7 @@ public class BrowseBean implements IContextListener
return;
}
// get the searcher object and perform the search of the root node
String query = searchContext.buildQuery();
// perform the search against the repo
UserTransaction tx = null;
ResultSet results = null;
try