Commit Graph

240 Commits

Author SHA1 Message Date
javanna 6076ccb7b2 Remove support for filter element in nested query
Replaced by query.
2015-10-28 10:50:29 +01:00
javanna f5fb669a46 [DOCS] remove tip on indices query elements order
Since we parse queries on the coordinating node, the order of the elements doesn't count anymore.
2015-10-28 10:50:28 +01:00
Christoph Büscher ca57763d2c Update indices-query.asciidoc 2015-10-23 22:55:40 +02:00
Christoph Büscher 0362550fd7 Update indices-query.asciidoc
The current description of the query seemed confusing to some people (e.g. https://twitter.com/wielinde/status/654582620630687744), this is just a proposal to simplify it.
2015-10-23 21:14:52 +02:00
debadair 69acde33c2 Fixed broken xrefs to query-dsl-not-query, which has been removed. 2015-10-20 13:01:37 -07:00
Christoph Büscher 5d25bc30cd Query DSL: Remove NotQueryBuilder
The NotQueryBuilder has been deprecated on the 2.x branches
and can be removed with the next major version. It can be
replaced by boolean query with added mustNot() clause.

Closes #13761
2015-10-20 19:43:16 +02:00
bharvi fd412551e4 Changed boost keyword with bool in bounding box query 2015-10-18 15:12:47 +05:30
bharvi 00db388722 The boost keyword changed to bool 2015-10-18 13:45:10 +05:30
Clinton Gormley 14b6314766 Update fuzzy-query.asciidoc
Closes #14092
2015-10-13 21:03:46 +02:00
Clinton Gormley dc018cf622 Updated docs for 3.0.0-beta 2015-10-07 13:27:46 +02:00
javanna 3d3197342d Merge branch 'master' into merge/query-refactoring 2015-09-25 14:38:53 +02:00
André Carvalho 070c836dce Gives more emphasys 2015-09-24 11:30:00 -03:00
André Carvalho d90fc8f7fd Documents that now is not affected by time_zone in range queries 2015-09-23 22:00:49 -03:00
javanna 73f7df510e Merge branch 'master' into feature/query-refactoring
Conflicts:
	core/src/main/java/org/elasticsearch/index/query/HasChildQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/HasChildQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/HasParentQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/HasParentQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryBuilder.java
	core/src/main/java/org/elasticsearch/index/query/functionscore/FunctionScoreQueryParser.java
	core/src/main/java/org/elasticsearch/index/query/functionscore/factor/FactorParser.java
	core/src/test/java/org/elasticsearch/ExceptionSerializationTests.java
	core/src/test/java/org/elasticsearch/benchmark/search/child/ChildSearchBenchmark.java
	core/src/test/java/org/elasticsearch/benchmark/search/child/ChildSearchShortCircuitBenchmark.java
	core/src/test/java/org/elasticsearch/index/query/SimpleIndexQueryParserTests.java
	core/src/test/java/org/elasticsearch/percolator/PercolatorIT.java
	core/src/test/java/org/elasticsearch/search/child/ChildQuerySearchIT.java
	docs/reference/query-dsl/has-parent-query.asciidoc
2015-09-11 14:15:12 +02:00
Adrien Grand 86f1b07df0 Docs: Remove docs for the `filtered`, `and`, `or` and `(f)query` queries. 2015-09-11 11:00:54 +02:00
Martijn van Groningen ab0847e0df parent/child: several cleanups
* Dropped ScoreType in favour of Lucene's ScoreMode
* Removed `score_type` option from `has_child` and `has_parent` queries in favour for the already existing `score_mode` option.
* Removed the score mode `sum` in favour for the already existing `total` score mode. (`sum` doesn't exist in Lucene's ScoreMode class)
* If `max_children` is set to `0` it now really means that zero children are allowed to match.
2015-09-10 17:15:41 +02:00
Simon Willnauer d2e53e0e0c Split HasParentQueryParser into toQuery and formXContent
This commit splits HasParentQueryParser into toQuery and fromXContent.
This change also deprecates several keys in favor of simplified settings
and adds basic unittests for HasParentQueryParser.

Relates to #10217
2015-09-09 12:06:44 +02:00
Clinton Gormley 0b5a027d6a Docs: Fixed bad ID in geo bound box 2015-08-18 12:20:00 +02:00
Clinton Gormley d13078546a Docs: Fixed malforme table in geo-polygon query 2015-08-18 12:16:49 +02:00
Nicholas Knize b2ba3847f7 Refactor geo_point validate* and normalize* options to ignore_malformed and coerce*
For consistency geo_point mapper's validate and normalize options are converted to ignore_malformed and coerced
2015-08-17 14:46:23 -05:00
Clinton Gormley c6c3a40cb6 Docs: Updated annotations for 2.0.0-beta1 2015-08-14 10:51:09 +02:00
Adrien Grand 00093a21dc Merge pull request #12294 from jpountz/fix/multi_match_boost
`multi_match` query applies boosts too many times.
2015-08-06 19:07:44 +02:00
Adrien Grand 8d5fff37ae `multi_match` query applies boosts too many times.
The `multi_match` query groups terms that have the same analyzer together and
then applies the boost of the first query in each group. This is not necessary
given that boosts for each term are already applied another way.
2015-08-06 19:07:12 +02:00
Clinton Gormley ac2b8951c6 Docs: Mapping docs completely rewritten for 2.0 2015-08-06 17:24:51 +02:00
Clinton Gormley 0b0846f84b Updated multi-match-query.asciidoc
Corrected note about which field is boosted in a cross-fields multi_match query.

Relates to #12294
2015-08-05 10:52:56 +02:00
Ryan Ernst f4ba5ac6b8 Merge pull request #12357 from rjernst/fix/12317
Update time_zone specification
2015-07-21 00:27:27 -07:00
Ryan Ernst dba42a83e2 Docs: Update time_zone specification
closes #12317
2015-07-21 00:22:53 -07:00
Clinton Gormley ecf801692e Docs: Fixed the date math expression on filtered query 2015-07-18 14:13:26 +02:00
Clinton Gormley bb4c4b55d2 Merge pull request #12264 from peschlowp/patch-6
Update match-query.asciidoc
2015-07-15 13:22:23 +02:00
Clinton Gormley 2b512f1f29 Docs: Use "js" instead of "json" and "sh" instead of "shell" for source highlighting 2015-07-14 18:14:09 +02:00
Jakob Reiter daa5a8da24 Fixed typos in examples on common-terms-query.asciidoc. JSON was invalid before 2015-07-08 17:47:04 +02:00
Adrien Grand da5fa6c4f3 Minor fixes to the `match` query.
Fixed documentation since the default rewrite method for fuzzy queries is to
select top terms, fixed usage of the fuzzy rewrite method, and removed unused
`rewrite` parameter.

Close #6932
2015-07-08 16:51:41 +02:00
Adrien Grand 8238f497d8 Expose Lucene's new TopTermsBlendedFreqScoringRewrite.
This rewrite method is interesting because it computes scores as if all terms
had the same frequencies, which avoids disappointments with ranking when a fuzzy
query ranks typos first given that they are less frequent than the correct term.
2015-07-08 16:01:47 +02:00
Christoph Büscher 1548e845e4 Update filtered-query.asciidoc 2015-07-06 15:00:13 +02:00
Clinton Gormley 1e5e4439ce Merge pull request #11983 from cdosborn/patch-1
Grammar fix to match query docs
2015-07-05 18:24:06 +02:00
Martijn van Groningen 47a43e4063 nested query: Added `min` score mode.
This score mode was added with the Lucene 5.2 release, but the `nested` query parser hasn't been changed to use it.
2015-06-29 12:26:30 +02:00
Clinton Gormley 765ac45168 Docs: Tidied up function score query docs
Closes #5991
2015-06-26 17:31:32 +02:00
Christoph Büscher f5f73259e4 Docs: Update Joda URLs in documentation. 2015-06-26 10:23:02 +02:00
Igor Motov d32443bfb5 Docs: add description of the analyze_wildcard parameter to the simple query string query docs 2015-06-22 18:26:31 -04:00
Alex Ksikes 3f6dae1a73 More Like This: renamed `ignore_like` to `unlike`
This changes the parameter name `ignore_like` to the more user friendly name
`unlike`. This later feature generates a query from the terms in `A` but not
from the terms in `B`. This translates to a result set which is like `A` but
unlike `B`. We could have further negatively boosted any documents that have
some `B`, but these documents already do not receive any contribution from
having `B`, and would therefore negatively compete with documents having `A`.

Closes #11117
2015-06-17 17:18:50 -05:00
Clinton Gormley 6e71f60b82 Update bool-query.asciidoc
Emphasise section about using bool query in filter context
2015-06-10 21:46:23 +02:00
Clinton Gormley a138f627be Docs: removed the unused query_dsl/index.asciidoc 2015-06-04 19:31:28 +02:00
Boaz Leskes 708320446e Doc: Minor typo fix in query_filter_context.asciidoc 2015-06-04 15:42:55 +02:00
Clinton Gormley f85a17ff1a Docs: Fixed heading level for in query DSL docs 2015-06-04 13:16:32 +02:00
Clinton Gormley 171687d207 Docs: Reorganised the Query DSL docs into families and explaing query vs filter context 2015-06-04 01:59:37 +02:00
Martijn van Groningen 1cfb6a79f1 Parent/child: refactored _parent field mapper and parent/child queries
* Cut the `has_child` and `has_parent` queries over to use Lucene's query time global ordinal join. The main benefit of this change is that parent/child queries can now efficiently execute if parent/child queries are wrapped in a bigger boolean query. If the rest of the query only hit a few documents both has_child and has_parent queries don't need to evaluate all parent or child documents any more.
* Cut the `_parent` field over to use doc values. This significantly reduces the on heap memory footprint of parent/child, because the parent id values are never loaded into memory.

Breaking changes:
* The `type` option on the `_parent` field can only point to a parent type that doesn't exist yet, so this means that an existing type/mapping can't become a parent type any longer.
* The `has_child` and `has_parent` queries can no longer be use in alias filters.

All these changes, improvements and breaks in compatibility only apply for indices created with ES version 2.0 or higher. For indices creates with ES <= 2.0 the older implementation is used.

It is highly recommended to re-index all your indices with parent and child documents to benefit from all the improvements that come with this refactoring. The easiest way to achieve this is by using the scan and bulk apis using a simple script.

Closes #6107
Closes #8134
2015-05-29 21:44:17 +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
Clinton Gormley 6171ae6cc4 Docs: Added stub entries for pages deleted from 1.x 2015-05-24 17:57:34 +02:00
Martijn van Groningen ece18f162e Removed `id_cache` from stats and cat apis.
Also removed the `id_cache` option from the clear cache api.

Closes #5269
2015-05-15 14:06:18 +02:00
Adrien Grand 630757906a Query DSL: Add `filter` clauses to `bool` queries.
These clauses filter the document space without affecting scoring and map to
Lucene's BooleanClause.Occur.FILTER. The `filtered` query is now deprecated and

```json
{
  "filtered": {
    "query": { //query },
    "filter": { //filter }
  }
}
```
should be replaced with
```json
{
  "bool": {
    "must": { //query },
    "filter": { //filter }
  }
}
```
2015-05-13 12:04:56 +02:00