Package com.google.appengine.api.prospectivesearch

Examples of com.google.appengine.api.prospectivesearch.ProspectiveSearchService


    @Test
    public void HotMinutesトピックにクエリが登録される() throws NullPointerException,
            IllegalArgumentException, IOException, ServletException {
        tester.start(PATH);
        ProspectiveSearchService service =
            ProspectiveSearchServiceFactory.getProspectiveSearchService();
        List<Subscription> subscriptions =
            service.listSubscriptions("HotMinutes");
        assertThat(" 三段階のクエリが登録される", subscriptions.size(), is(3));
        for (Subscription subscription : subscriptions) {
            assertThat("memoCount = [25|50|100]", subscription
                .getQuery()
                .matches("memoCount = (25|50|100)"), is(true));
View Full Code Here


            return doGet();
        }
    }

    Navigation doPost() {
        ProspectiveSearchService prospectiveSearchService =
            ProspectiveSearchServiceFactory.getProspectiveSearchService();
        Entity document = prospectiveSearchService.getDocument(request);
        logger.info("Topic:" + asString("topic") + ", id=" + asString("id"));
        logger.info(document.toString());
        sendMessage(document);
        return null;
    }
View Full Code Here

        sendMessage(document);
        return null;
    }

    Navigation doGet() {
        ProspectiveSearchService prospectiveSearchService =
            ProspectiveSearchServiceFactory.getProspectiveSearchService();
        String topic = "HotMinutes";
        long leaseDurationSeconds = 0;
        Map<String, FieldType> schema = new HashMap<String, FieldType>();
        schema.put("memoCount", FieldType.INT32);
        prospectiveSearchService.subscribe(
            topic,
            "HotMinutes_25",
            leaseDurationSeconds,
            "memoCount = 25",
            schema);
        prospectiveSearchService.subscribe(
            topic,
            "HotMinutes_50",
            leaseDurationSeconds,
            "memoCount = 50",
            schema);
        prospectiveSearchService.subscribe(
            topic,
            "HotMinutes_100",
            leaseDurationSeconds,
            "memoCount = 100",
            schema);
View Full Code Here

        return getBaseDeployment();
    }

    @Test
    public void testTopicIsCreatedWhenFirstSubscriptionForTopicIsCreated() {
        ProspectiveSearchService pss = ProspectiveSearchServiceFactory.getProspectiveSearchService();
        pss.subscribe(TOPIC, "mySubscription", 0, "title:hello", createSchema("title", FieldType.STRING));
        assertTopicExists(TOPIC);
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.prospectivesearch.ProspectiveSearchService

Copyright © 2018 www.massapicom. 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.