Fixing bug with search exclusion
This commit is contained in:
parent
2d72b1aa42
commit
f1a56e5947
2 changed files with 4 additions and 4 deletions
|
@ -34,9 +34,9 @@ public class ExcludeBasedOnType implements SearchIndexExcluder {
|
||||||
if( typeURIinExcludeList( ind.getVClass() ))
|
if( typeURIinExcludeList( ind.getVClass() ))
|
||||||
return SKIP_MSG;
|
return SKIP_MSG;
|
||||||
|
|
||||||
List<VClass> vclasses = ind.getVClasses();
|
List<VClass> vclasses = new ArrayList<VClass>();
|
||||||
if( vclasses == null)
|
vclasses.addAll( ind.getVClasses()!=null?ind.getVClasses():Collections.EMPTY_LIST );
|
||||||
return null;
|
vclasses.addAll( ind.getVClasses(true)!=null?ind.getVClasses(true):Collections.EMPTY_LIST );
|
||||||
|
|
||||||
for( VClass vclz : vclasses){
|
for( VClass vclz : vclasses){
|
||||||
if( typeURIinExcludeList( vclz ))
|
if( typeURIinExcludeList( vclz ))
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class ExcludeBasedOnTypeTest {
|
||||||
public void testCheckForExclusion2() {
|
public void testCheckForExclusion2() {
|
||||||
|
|
||||||
ExcludeBasedOnType ebot = new ExcludeBasedOnType();
|
ExcludeBasedOnType ebot = new ExcludeBasedOnType();
|
||||||
ebot.addTypeToExclude("http://xmlns.com/foaf/0.1/KillerRobot");
|
ebot.addTypeToExclude("http://example.com/KillerRobot");
|
||||||
|
|
||||||
IndividualImpl ind = new IndividualImpl();
|
IndividualImpl ind = new IndividualImpl();
|
||||||
ind.setURI("http://example.com/n2343");
|
ind.setURI("http://example.com/n2343");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue