Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/tags/nexu…
Browse files Browse the repository at this point in the history
…s-1.7.1@6707 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
  • Loading branch information
dbradicich committed Jul 2, 2010
2 parents 0b410df + 06f6e13 commit 800918e
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 123 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Ext.extend(Sonatype.repoServer.PluginInfoTab, Ext.Panel, {
}

var documentation = this.payload.data.documentation;
if (!Ext.isEmpty(documentation))
if (!Ext.isEmpty(documentation) && documentation.length != 0)
{
pluginPropertiesPanel.add({
xtype : 'label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,22 @@ public IteratorSearchResponse flatIteratorSearch( Map<String, String> terms, Str
return IteratorSearchResponse.EMPTY_ITERATOR_SEARCH_RESPONSE;
}

return m_lucene.searchArtifactIterator( terms.get( TERM_KEYWORD ), repositoryId, from, count, hitLimit, true,
boolean uniqueRGA = false;

if ( filters != null )
{
for ( ArtifactInfoFilter filter : filters )
{
if ( filter instanceof UniqueArtifactFilterPostprocessor )
{
uniqueRGA = true;

break;
}
}
}

return m_lucene.searchArtifactIterator( terms.get( TERM_KEYWORD ), repositoryId, from, count, hitLimit, uniqueRGA,
searchType, filters );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ public IteratorSearchResponse flatIteratorSearch( Map<String, String> terms, Str
return IteratorSearchResponse.EMPTY_ITERATOR_SEARCH_RESPONSE;
}

boolean collapseRepos = true;

// if the user is querying against these fields, we want to return them properly
if ( filters != null )
{
Expand All @@ -115,30 +113,21 @@ public IteratorSearchResponse flatIteratorSearch( Map<String, String> terms, Str
{
UniqueArtifactFilterPostprocessor uFilter = (UniqueArtifactFilterPostprocessor) filter;

int found = 0;
if ( terms.containsKey( MavenCoordinatesSearcher.TERM_VERSION ) )
{
uFilter.addField( MAVEN.VERSION );
found++;
}
if ( terms.containsKey( MavenCoordinatesSearcher.TERM_PACKAGING ) )
{
uFilter.addField( MAVEN.PACKAGING );
found++;
}
if ( terms.containsKey( MavenCoordinatesSearcher.TERM_CLASSIFIER ) )
{
uFilter.addField( MAVEN.CLASSIFIER );
found++;
}

// if we have matched against at least 2 of these, that means we are doing
// full search, and NOT aggregation
if ( found >= 2 )
{
// in GAV search, we _always_ expand repository
uFilter.addField( MAVEN.REPOSITORY_ID );
collapseRepos = false;
}

break;
}
Expand All @@ -147,7 +136,7 @@ public IteratorSearchResponse flatIteratorSearch( Map<String, String> terms, Str

return m_lucene.searchArtifactIterator( terms.get( TERM_GROUP ), terms.get( TERM_ARTIFACT ),
terms.get( TERM_VERSION ), terms.get( TERM_PACKAGING ), terms.get( TERM_CLASSIFIER ), repositoryId, from,
count, hitLimit, collapseRepos, searchType, filters );
count, hitLimit, false, searchType, filters );
}

}
Loading

0 comments on commit 800918e

Please sign in to comment.