Examples of GDataSearcher


Examples of org.apache.lucene.gdata.search.GDataSearcher

    public void testGetServiceSearcher() {

        this.controller.initialize();
        ReferenceCounter<IndexSearcher> refCounter = this.controller.indexerMap
                .get(ProvidedServiceStub.SERVICE_NAME).getSearcher();
        GDataSearcher searcher = this.controller
                .getServiceSearcher(new ProvidedServiceStub());
        assertNotNull(searcher);
        GDataSearcher sameSearcher = this.controller
                .getServiceSearcher(new ProvidedServiceStub());
        assertSame(refCounter, this.controller.indexerMap.get(
                ProvidedServiceStub.SERVICE_NAME).getSearcher());

        this.controller.commitCallBack(ProvidedServiceStub.SERVICE_NAME);
        GDataSearcher newSearcher = this.controller
                .getServiceSearcher(new ProvidedServiceStub());
        assertNotSame(refCounter, this.controller.indexerMap.get(
                ProvidedServiceStub.SERVICE_NAME).getSearcher());

        sameSearcher.close();
        searcher.close();
        newSearcher.close();

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.