Source:
<code>public void testIndexDrlLHSType() throws IOException, InterruptedException { ioService().startBatch(ioService().getFileSystem(basePath.toUri())); final Path path1 = basePath.resolve( "drl1.drl" ); final String drl1 = loadText( "drl1.drl" ); ioService().write( path1, drl1 ); final Path path2 = basePath.resolve( "drl2.drl" ); final String drl2 = loadText( "drl2.drl" ); ioService().write( path2, drl2 ); final Path path3 = basePath.resolve( "drl3.drl" ); final String drl3 = loadText( "drl3.drl" ); ioService().write( path3, drl3 ); ioService().endBatch(); <START> Thread.sleep( 15000 ); END> List<String> index = Arrays.asList(KObjectUtil.toKCluster(basePath.getFileSystem()).getClusterId()); { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "*.Applicant", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 3, path1, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "org.kie.workbench.common.services.refactoring.backend.server.drl.classes.Applicant", ResourceType.JAVA ) ).build(); searchFor(index, query, 3, path1, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "*.Mortgage", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 2, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "org.kie.workbench.common.services.refactoring.backend.server.drl.classes.Mortgage", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 2, path2, path3 ); } }</code><technical_language>@rsynek person enough knowledge of codebase able fix it. @porcelli</technical_language>

Target:
public void testIndexDrlLHSType() throws IOException, InterruptedException { ioService().startBatch(ioService().getFileSystem(basePath.toUri())); final Path path1 = basePath.resolve( "drl1.drl" ); final String drl1 = loadText( "drl1.drl" ); ioService().write( path1, drl1 ); final Path path2 = basePath.resolve( "drl2.drl" ); final String drl2 = loadText( "drl2.drl" ); ioService().write( path2, drl2 ); final Path path3 = basePath.resolve( "drl3.drl" ); final String drl3 = loadText( "drl3.drl" ); ioService().write( path3, drl3 ); ioService().endBatch(); Thread.sleep( 12000 ); List<String> index = Arrays.asList(KObjectUtil.toKCluster(basePath.getFileSystem()).getClusterId()); { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "*.Applicant", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 3, path1, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "org.kie.workbench.common.services.refactoring.backend.server.drl.classes.Applicant", ResourceType.JAVA ) ).build(); searchFor(index, query, 3, path1, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "*.Mortgage", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 2, path2, path3 ); } { final Query query = new SingleTermQueryBuilder( new ValueReferenceIndexTerm( "org.kie.workbench.common.services.refactoring.backend.server.drl.classes.Mortgage", ResourceType.JAVA, TermSearchType.WILDCARD ) ).build(); searchFor(index, query, 2, path2, path3 ); } }