Commit Graph

224 Commits

Author SHA1 Message Date
Isabel Drost-Fromm 4a5f9956a9 Remove reference to deleted limit query. 2015-10-20 11:09:25 +02:00
Isabel Drost-Fromm dac88c0281 Updates java query dsl documentation
Closes #13800
2015-10-20 09:37:36 +02:00
javanna a6e7a5f307 Java api: remove the count api
Closes #14166
Closes #13928
2015-10-19 14:40:52 +02:00
Robert Berg 0279b219bb Edit search scroll docs for syntactic style 2015-09-19 14:42:14 -05:00
David Pilato 34ee4c2d66 [build] remove shaded elasticsearch version
The shaded version of elasticsearch was built at the very beginning to avoid dependency conflicts in a specific case where:

* People use elasticsearch from Java
* People needs to embed elasticsearch jar within their own application (as it's today the only way to get a `TransportClient`)
* People also embed in their application another (most of the time older) version of dependency we are using for elasticsearch, such as: Guava, Joda, Jackson...

This conflict issue can be solved within the projects themselves by either upgrade the dependency version and use the one provided by elasticsearch or by shading elasticsearch project and relocating some conflicting packages.

Example
-------

As an example, let's say you want to use within your project `Joda 2.1` but elasticsearch `2.0.0-beta1` provides `Joda 2.8`.
Let's say you also want to run all that with shield plugin.

Create a new maven project or module with:

```xml
<groupId>fr.pilato.elasticsearch.test</groupId>
<artifactId>es-shaded</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <elasticsearch.version>2.0.0-beta1</elasticsearch.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch</artifactId>
        <version>${elasticsearch.version}</version>
    </dependency>
    <dependency>
        <groupId>org.elasticsearch.plugin</groupId>
        <artifactId>shield</artifactId>
        <version>${elasticsearch.version}</version>
    </dependency>
</dependencies>
```

And now shade and relocate all packages which conflicts with your own application:

```xml
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.1</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <relocations>
                            <relocation>
                                <pattern>org.joda</pattern>
                                <shadedPattern>fr.pilato.thirdparty.joda</shadedPattern>
                            </relocation>
                        </relocations>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
```

You can create now a shaded version of elasticsearch + shield by running `mvn clean install`.

In your project, you can now depend on:

```xml
<dependency>
    <groupId>fr.pilato.elasticsearch.test</groupId>
    <artifactId>es-shaded</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>joda-time</groupId>
    <artifactId>joda-time</artifactId>
    <version>2.1</version>
</dependency>
```

Build then your TransportClient as usual:

```java
TransportClient client = TransportClient.builder()
        .settings(Settings.builder()
                        .put("path.home", ".")
                        .put("shield.user", "username:password")
                        .put("plugin.types", "org.elasticsearch.shield.ShieldPlugin")
        )
        .build();
client.addTransportAddress(new InetSocketTransportAddress(new InetSocketAddress("localhost", 9300)));

// Index some data
client.prepareIndex("test", "doc", "1").setSource("foo", "bar").setRefresh(true).get();
SearchResponse searchResponse = client.prepareSearch("test").get();
```

If you want to use your own version of Joda, then import for example `org.joda.time.DateTime`. If you want to access to the shaded version (not recommended though), import `fr.pilato.thirdparty.joda.time.DateTime`.

You can run a simple test to make sure that both classes can live together within the same JVM:

```java
CodeSource codeSource = new org.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource();
System.out.println("unshaded = " + codeSource);

codeSource = new fr.pilato.thirdparty.joda.time.DateTime().getClass().getProtectionDomain().getCodeSource();
System.out.println("shaded = " + codeSource);
```

It will print:

```
unshaded = (file:/path/to/joda-time-2.1.jar <no signer certificates>)
shaded = (file:/path/to/es-shaded-1.0-SNAPSHOT.jar <no signer certificates>)
```

This PR also removes fully-loaded module.

By the way, the project can now build with Maven 3.3.3 so we can relax a bit our maven policy.
2015-09-02 11:57:10 +02:00
Simon Willnauer efa39a0eb0 [DOCS] Fix Java API TransportClient example 2015-08-24 15:13:26 +02:00
Clinton Gormley c6c3a40cb6 Docs: Updated annotations for 2.0.0-beta1 2015-08-14 10:51:09 +02:00
Michael McCandless ac2e0fd6a0 Remove delete-by-query core docs
We moved delete-by-query from core to a plugin, but forgot to remove the core docs.

Closes #12585
2015-08-01 05:14:46 -04:00
Chris Earle 8efa18e616 Changing ImmutableSettings to Settings for ES 2.0 2015-07-30 22:08:48 -05:00
Chris Earle 87117a5b71 Adding downsides for the embedded node client
Note: this is being committed to the 1.6 and 1.7 branches.
2015-07-30 22:05:07 -05:00
Lee Hinman 62c4abd14c Added an import statement. 2015-07-28 14:19:45 -06:00
David Pilato 462b5c822c [doc] fix master build
The `:ref:` link in java-api doc is connected to `current` version which is at this time `1.6`.
This commit patch this.

That being said, we might have to change it again once master will become `current` doc.
2015-07-02 07:54:30 +02:00
David Pilato 1e35674eb0 [doc] Reorganize and clean Java documentation
This commit reorganizes the docs to make Java API docs looking more like the REST docs.
Also, with 2.0.0, FilterBuilders don't exist anymore but only QueryBuilders.

Also, all docs api move now to docs/java-api/docs dir as for REST doc.

Remove removed queries/filters
-----

* Remove Constant Score Query with filter
* Remove Fuzzy Like This (Field) Query (flt and flt_field)
* Remove FilterBuilders

Move filters to queries
-----

* Move And Filter to And Query
* Move Bool Filter to Bool Query
* Move Exists Filter to Exists Query
* Move Geo Bounding Box Filter to Geo Bounding Box Query
* Move Geo Distance Filter to Geo Distance Query
* Move Geo Distance Range Filter to Geo Distance Range Query
* Move Geo Polygon Filter to Geo Polygon Query
* Move Geo Shape Filter to Geo Shape Query
* Move Has Child Filter by Has Child Query
* Move Has Parent Filter by Has Parent Query
* Move Ids Filter by Ids Query
* Move Limit Filter to Limit Query
* Move MatchAll Filter to MatchAll Query
* Move Missing Filter to Missing Query
* Move Nested Filter to Nested Query
* Move Not Filter to Not Query
* Move Or Filter to Or Query
* Move Range Filter to Range Query
* Move Ids Filter to Ids Query
* Move Term Filter to Term Query
* Move Terms Filter to Terms Query
* Move Type Filter to Type Query

Add missing queries
-----

* Add Common Terms Query
* Add Filtered Query
* Add Function Score Query
* Add Geohash Cell Query
* Add Regexp Query
* Add Script Query
* Add Simple Query String Query
* Add Span Containing Query
* Add Span Multi Term Query
* Add Span Within Query

Reorganize the documentation
-----

* Organize by full text queries
* Organize by term level queries
* Organize by compound queries
* Organize by joining queries
* Organize by geo queries
* Organize by specialized queries
* Organize by span queries
* Move Boosting Query
* Move DisMax Query
* Move Fuzzy Query
* Move Indices Query
* Move Match Query
* Move Mlt Query
* Move Multi Match Query
* Move Prefix Query
* Move Query String Query
* Move Span First Query
* Move Span Near Query
* Move Span Not Query
* Move Span Or Query
* Move Span Term Query
* Move Template Query
* Move Wildcard Query

Add some missing pages
----

* Add multi get API
* Add indexed-scripts link

Also closes #7826
Related to https://github.com/elastic/elasticsearch/pull/11477#issuecomment-114745934
2015-07-01 22:19:11 +02:00
Clinton Gormley 64d8834a6f Merge pull request #11868 from YoungHu/patch-1
correct mis-type in update docs
2015-06-26 17:46:45 +02:00
David Pursehouse b49e66c3a1 Replace references to ImmutableSettings with Settings
ImmutableSettings was merged into Settings in commit 4873070.

Change-Id: I06bd0150381d131593920c2328c46beacf49661f
2015-06-24 14:54:53 +09:00
oyiadom 6437478d65 [doc] Add missing imports for Java bulk API doc
I was unable to get my BulkProcessor script to work without importing the "ByteSizeUnit" and "ByteSizeValue" classes.  Perhaps I overlooked something in the example and do not understand its code.
2015-06-19 09:21:56 +02:00
David Pilato 65b1ce9900 [doc] fix outdated java api examples
* QueryBuilders.queryString is now QueryBuilders.queryStringQuery
* DateHistogram.Interval is now DateHistogramInterval
* Refactoring of buckets in aggs
* FilterBuilders has been replaced by QueryBuilders

Closes #9976.
2015-06-16 09:45:07 +02:00
Colin Goodheart-Smithe 35a58d874e Scripting: Unify script and template requests across codebase
This change unifies the way scripts and templates are specified for all instances in the codebase. It builds on the Script class added previously and adds request building and parsing support as well as the ability to transfer script objects between nodes. It also adds a Template class which aims to provide the same functionality for template APIs

Closes #11091
2015-05-29 16:52:04 +01:00
Alex Chan e31049988b [Docs] Fix minor spelling errors
Closes #11320
2015-05-25 19:56:43 +02:00
Martijn van Groningen acdd9a5dd9 parent/child: Removed the `top_children` query. 2015-05-10 16:30:19 +02:00
Andrew Selden c953e99324 Merge pull request #10864 from aleph-zero/issues/9606
Remove (dfs_)query_and_fetch from the REST API
2015-05-07 12:51:28 -07:00
Pascal Borreli af6d890ad5 Docs: Fixed typos
Closes #10973
2015-05-05 10:38:05 +02:00
Shay Banon 187d79b6df Centralize admin implementations and action execution
This change removes the multiple implementations of different admin interfaces and centralizes it with AbstractClient. It also makes sure *all* executions of actions now go through a single AbstractClient#execute method, taking care of copying headers and wrapping listener.
This also has the side benefit of removing all the code around differnet possible clients, and removes quite a bit of code (most of the + code is actually removal of generics and such).

This change also changes how TransportClient is constructed, requiring a Builder to create it, its a breaking change and its noted in the migration guide.

Yea another step towards simplifying the action infra and making it simpler...
2015-05-04 23:40:17 +02:00
Clinton Gormley df1914cb21 Java API docs: Removed mlt-field 2015-05-01 21:32:02 +02:00
Clinton Gormley c28bf3bb3f Docs: Updated elasticsearch.org links to elastic.co 2015-05-01 20:46:12 +02:00
Igor Motov 9b76be92b3 Docs: add notes about using close and awaitClose with bulk processor
Closes #10839
2015-04-29 10:53:16 -04:00
aleph-zero 04c1521428 Note concerning usage of (dfs_)query_and_fetch
Add a note indicating that (dfs_)query_and_fetch are only intended for
internal use.
2015-04-28 16:28:54 -07:00
Adam Mollenkopf 86c2c202fe Docs: Update extendedstats-aggregation.asciidoc
code snippet should show ExtendedStats, not Stats

Closes #10683
2015-04-25 19:07:21 +02:00
Stefan f7e6d79569 [DOCS] update versions in java api module.xml
The filenames are updated to fit to the current elasticsearch version
2015-04-07 18:10:53 +02:00
Colin Goodheart-Smithe 5c44db50bc [DOCS] update JAVA API with aggregation changes
The Histogram and Range APIs for the aggregations changed so that there was a common interface between he types of Range/Histogram. This PR reflects that change in the Java API docs

Contributes to #9976
2015-03-05 11:09:49 +00:00
Clinton Gormley 8f73d95409 Update search.asciidoc
Removed operation threading from the docs. Not supported since v1.2.0

Closes #9917
2015-02-28 04:48:57 +01:00
eBuildy 5c57db4aae A getHits() was forgotten!
(cherry picked from commit 11b3053)
(cherry picked from commit 89294e9)
2015-01-15 19:11:30 +01:00
David Pilato a50d82c44b [Doc] Use byte[] as example instead of String
Closes #8973.
2015-01-02 16:20:32 +01:00
Joao Duarte d73f7c90aa doc: transport sniff only adds data nodes 2014-12-17 11:29:01 +00:00
David Pilato 26a0976adb [Doc] Java API: add information on JBoss EAP
Closes #3445.
2014-12-03 17:02:02 +01:00
David Pilato 778f76adea [Doc] Java API: add search templates
Closes #7321.
2014-12-03 16:45:30 +01:00
David Pilato f37355a427 [Doc] Add an UpdateRequest example to Java API doc
Closes #7083.
2014-12-03 16:03:24 +01:00
David Pilato 317192b647 java: QueryBuilders cleanup (add and deprecate)
Some QueryBuilders are missing or have a different naming than the other ones.

This patch is applied to branch 1.x and master (elasticsearch 1.5 and 2.0):

Added
-----

* `templateQuery(...)`
* `commonTermsQuery(...)`
* `queryStringQuery(...)`
* `simpleQueryStringQuery(...)`

Deprecated
----------

* `commonTerms(...)`
* `queryString(...)`
* `simpleQueryString(...)`
2014-12-01 14:41:25 +01:00
David Pilato 45c24b2eb3 Remove java facet documentation in master
As we did in reference guide, we need to remove facet java code in master branch.
2014-12-01 14:22:48 +01:00
Clinton Gormley c4fd1247c0 Docs: Fixed bad link to top-hits agg 2014-11-30 09:38:57 +01:00
David Pilato d7d937300a Add java documentation for aggregations
Buckets:
--------

* terms
* range
* global
* filter
* filters
* missing
* nested
* reverse nested
* children
* significant terms
* date range
* ip range
* range
* histogram
* date histogram
* geo distance
* geo hash grid

Metrics:
--------

* min
* max
* sum
* avg
* stats
* extended stats
* value count
* percentiles
* percentile rank
* cardinality
* geo bounds
* top hits
* scripted metric
2014-11-29 19:46:33 +01:00
Alex Ksikes 35f55608cc MLT Field Query: remove it from master
The MLT field query is simply replaced by a MLT query set to specififc field.
To simplify code maintenance we should deprecate it in 1.4 and remove it in
2.0.

Closes #8238
2014-10-29 10:19:00 +01:00
wmx3ng 940534299d Docs: Some Data Cant't be obtained.
In previous case, the first 100 data can't be obtained.

Closes #8103
2014-10-17 15:20:33 +02:00
David Pilato 046a3a02f5 Docs: fix no callouts refer to list item 3 2014-09-23 13:30:36 +02:00
David Pilato cdd4d00f46 Docs: java add static imports for query and filter builders
Also move and add inline comments to references

Closes #6920.
2014-09-23 12:39:57 +02:00
David Pilato f0dc8a8ffb Document the Java BulkProcessor
Closes #7638.
2014-09-22 15:32:29 +02:00
David Pilato 53c0e92801 Docs: IndexResponse.matches() does not exist anymore
Since 1.0, percolator has been redesigned so percolator is not applied anymore at index time.

Closes #7548.
2014-09-22 15:20:31 +02:00
Elie A 40608ce266 Update java source example
From the version 1.0 FilterBuilders and QueryBuilders are not part from org.elasticsearch.index.query.xcontent package no more.

Closes #7701.

(cherry picked from commit 32d4200)
2014-09-22 14:37:27 +02:00
Joao Duarte a6e0f02220 Doc: Fixes node client section name on Java API Doc
Closes #7539
2014-09-08 11:20:49 +02:00
Dominik Surowiecki 7c2490b2ad Docs: Wrong class name
Was QFilterBuilders, should be FilterBuilders.

Closes #7611
2014-09-07 08:46:41 +02:00
Brian Murphy bc570919ee [DOCS][FIX] Fix doc parsing, broken closing block 2014-07-16 11:18:21 +01:00
Naoki Orii e662d3c535 Docs: YAML mappings use colons, not equals sign
Closes #6750
2014-07-08 13:17:53 +02:00
Nick Steele d857a08cb0 Docs: grammatical error
Closes #6716
2014-07-08 13:16:06 +02:00
Christian Wolfe 9a11c909f3 [DOCS] Clean up Java-API docs
Fixed some wording and subject/verb agreement while reading through the Java API documentation.
2014-06-05 19:29:17 +02:00
stephlag a10bedfa96 [DOCS] Update index docs to match changes in IndexResponse class
IndexResponse.id() ->  IndexResponse.getId()
2014-06-03 13:48:42 +02:00
Igal 20b05b56c4 [DOCS] Update client.asciidoc
Should be classpath rather than classloader.

Close #5965
2014-05-06 10:28:13 +02:00
javanna 8fe6fe638d [DOCS] fixed transport client link in java api docs 2014-03-31 18:35:57 +02:00
Binh Ly 612e95a321 [DOCS] Java API JSON typo 2014-03-03 18:20:49 -05:00
Kevin 1075b9ae33 [DOCS] should use setPostFilter instead of setFilter 2014-02-13 14:28:00 +11:00
Clinton Gormley 164d52767c [DOCS] Removed deprecated queries/filters from Java API docs 2014-02-07 20:59:42 +01:00
Evan Wong 593f98a373 Fixed the string() code literal in the java client index api doc. 2014-02-06 17:29:40 +01:00
Simon Willnauer fa16969360 Cleanup comments and class names s/ElasticSearch/Elasticsearch
* Clean up s/ElasticSearch/Elasticsearch on docs/*
 * Clean up s/ElasticSearch/Elasticsearch on src/* bin/* & pom.xml
 * Clean up s/ElasticSearch/Elasticsearch on NOTICE.txt and README.textile

Closes #4634
2014-01-07 11:21:51 +01:00
Shay Banon 7c32269f4f Dist. Percolation: Use .percolator instead of _percolator for type name
Use .percolator as the internal (hidden) type name for percolators within the index. Seems nicer name to represent "hidden" types within an index.
closes #4090
2013-11-05 20:02:59 +01:00
David Pilato 4efd94e7cf Java API Documentation (0.90+) needs update for accessors in Facets docs
Closes #3921.
(cherry picked from commit a753c48)
2013-10-17 09:50:15 +02:00
Martijn van Groningen b7c4adeea3 [Docs] update reference to remove documentation about percolating during an index, bulk or update request. 2013-10-16 16:31:36 +02:00
Jonathan CHAMPION 278e99ef69 Fix small doc mistakes 2013-10-10 11:20:13 +02:00
Alexander Reelsen f0cf97c0ac Changed documentation to use getter notation
Updated some java documentation to reflect the use of getters instead of calling methods based on field names.

Relates to #2657
2013-10-06 21:18:43 +02:00
Lee Hinman b923c138b8 Uniquify more anchor links to fix asciidoc 2013-10-01 10:28:35 -06:00
Lee Hinman 0442b737be Add more anchor links to documentation
Related to #3679
2013-09-30 13:13:16 -06:00
Martijn van Groningen 4958a6805f Updated outdated default setting in doc. 2013-09-18 18:01:23 +02:00
Clinton Gormley 17fb10689c The docs URLs have changed to include en/ 2013-09-13 11:23:37 +02:00
Clinton Gormley 17234fe454 [DOCS] link: prefix not required when using {ref} attributes 2013-09-03 16:16:15 +02:00
Clinton Gormley e6127fc082 [DOCS] Chunk depth now configurable, so [float] not required 2013-09-03 16:15:50 +02:00
Clinton Gormley 822043347e Migrated documentation into the main repo 2013-08-29 01:24:34 +02:00