Package indextype

Examples of indextype.Index1Type1.index()


                // Issue is fixed on ES 1.1.1
                GeoPoint location = new GeoPoint(30.6943566,-88.0430541);
                type1.location = location;

                // indexing
                IndexResponse index = type1.index();

                // Read
                Index1Type1 typeResult = Index1Type1.find.byId(index.getId());

                assertThat(typeResult).isNotNull();
View Full Code Here


        running(esFakeApplication(), new Runnable() {
            @Override
            public void run() {
                GeoPoint location = new GeoPoint(30.6943566,-88.0430541);
                Index1Type1 index1Type1 = new Index1Type1("1", "name1", "category", new Date(), location);
                index1Type1.index();
                IndexService.refresh();

                IndexQuery<Index1Type1> query = new IndexQuery<Index1Type1>(Index1Type1.class);
                List<F.Promise<? extends IndexResults<Index1Type1>>> promises = new ArrayList<F.Promise<? extends IndexResults<Index1Type1>>>();
                for (int i = 0; i < 10; i++) {
View Full Code Here

            @Override
            public void run() {
                // Blocking
                GeoPoint location = new GeoPoint(30.6943566,-88.0430541);
                Index1Type1 index1Type1 = new Index1Type1("1", "name1", "category", new Date(),location);
                index1Type1.index();
                Map<String, Object> fieldNewValues = new HashMap<>();
                fieldNewValues.put("name", "new-name");
                String updateScript = "ctx._source.name = name";
                index1Type1.update(fieldNewValues, updateScript);
View Full Code Here

        running(esFakeApplication(), new Runnable() {
            @Override
            public void run() {
                GeoPoint location = new GeoPoint(30.6943566,-88.0430541);
                Index1Type1 index1Type1 = new Index1Type1("1", "name1", "category", new Date(), location);
                index1Type1.index();

                location = new GeoPoint(12.6943566,-10.0430541);
                Index1Type1 index1Type2 = new Index1Type1("2", "name1", "category", new Date(), location);
                index1Type2.index();
View Full Code Here

                Index1Type1 index1Type1 = new Index1Type1("1", "name1", "category", new Date(), location);
                index1Type1.index();

                location = new GeoPoint(12.6943566,-10.0430541);
                Index1Type1 index1Type2 = new Index1Type1("2", "name1", "category", new Date(), location);
                index1Type2.index();

                // refresh the index so the documents appear in the search results
                IndexService.refresh();

                assertThat(Index1Type1.find.byId("1").name).isEqualTo("name1");
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.