Commit Graph

29 Commits

Author SHA1 Message Date
FUJI Goro 2baa19ea64 [Docs] Specify function score logarithm modifiers ()
The logarithm with base 10 is called "Common Logarithm".
2018-02-27 10:29:43 -08:00
Ian Fisk 8cb1391f40 Docs: Use correct field name in Field Value factor docs. () 2017-08-08 16:34:20 -04:00
Adrien Grand f1ff7f2454 Require a field when a `seed` is provided to the `random_score` function. ()
We currently use fielddata on the `_id` field which is trappy, especially as we
do it implicitly. This changes the `random_score` function to use doc ids when
no seed is provided and to suggest a field when a seed is provided.

For now the change only emits a deprecation warning when no field is supplied
but this should be replaced by a strict check on 7.0.

Closes 
2017-07-19 14:11:15 +02:00
Ryan Ernst a03b6c2fa5 Scripting: Change keys for inline/stored scripts to source/id ()
This commit adds back "id" as the key within a script to specify a
stored script (which with file scripts now gone is no longer ambiguous).
It also adds "source" as a replacement for "code". This is in an attempt
to normalize how scripts are specified across both put stored scripts and script usages, including search template requests. This also deprecates the old inline/stored keys.
2017-06-09 08:29:25 -07:00
Nik Everett 048191ceb6 CONSOLEify highlighting a function_score docs
Converts many of the partial examples into full search requests.

Relates 
2017-04-06 08:13:56 -04:00
Giuseppe ecbeffcb1e Add note about min_score filtering efficiency ()
* Add note about min_score filtering efficiency

* Reword to mention 'HAVING'

* Remove reference to HAVING
2017-02-13 12:15:01 +01:00
Pascal Borreli fcb01deb34 Fixed typos () 2016-10-10 14:51:47 -06:00
Greg Ichneumon Brown 639b7278d9 Docs: clarify calculation of sigma and lambda in function_score ()
- Using log() to indicate natural log can add some confusion when trying to further adjust/tweak scores. Other parts of the API (field_value_factor on this same page) use 'ln' and 'log', so this change should be more consistent
- Fixes 
- I generated the images using http://latex2png.com/ at a resolution of 150 which seemed to be about the same size as before
2016-09-02 14:41:07 +02:00
Greg Ichneumon Brown 92c54aa4a1 Docs: clarify scale is applied at origin+offest ()
- fixes 
2016-08-31 17:02:59 +02:00
Nik Everett 1e587406d8 Fail yaml tests and docs snippets that get unexpected warnings
Adds `warnings` syntax to the yaml test that allows you to expect
a `Warning` header that looks like:
```
    - do:
        warnings:
            - '[index] is deprecated'
            - quotes are not required because yaml
            - but this argument is always a list, never a single string
            - no matter how many warnings you expect
        get:
            index:    test
            type:    test
            id:        1
```

These are accessible from the docs with:
```
// TEST[warning:some warning]
```

This should help to force you to update the docs if you deprecate
something. You *must* add the warnings marker to the docs or the build
will fail. While you are there you *should* update the docs to add
deprecation warnings visible in the rendered results.
2016-08-04 15:23:05 -04:00
Adrien Grand 37d5bcb264 Clarify `function_score` docs.
Closes 
2016-07-19 10:25:48 +02:00
Britta Weber 57a734e641 [doc] explain avg in function_score better ()
* [doc] explain avg in function_score better
2016-06-30 11:52:53 +02:00
Robert Muir 6fc1a22977 cutover some docs to painless 2016-06-27 09:55:16 -04:00
Isabel Drost-Fromm 4c02e97bcd Add back doc execution to query dsl.
Relates to 

This reverts commit 20aafb1196.
2016-05-24 12:43:41 +02:00
Isabel Drost-Fromm 20aafb1196 Revert "Add Autosense annotation for query dsl testing" 2016-05-17 20:55:56 +02:00
Isabel Drost-Fromm a865090cf3 CONSOLE is the new AUTOSENSE 2016-05-10 12:42:17 +02:00
Isabel Drost-Fromm e486560ea8 Add Autosense annotation for query dsl testing
this adds the autosense annotation to a couple of query dsl
docs files and fixes the snippets to work in the tests along
the way.
2016-05-10 11:54:48 +02:00
Clinton Gormley 3f594089c2 Renamed all AUTOSENSE snippets to CONSOLE () 2016-05-09 15:42:23 +02:00
Nik Everett 4b1c116461 Generate and run tests from the docs
Adds infrastructure so `gradle :docs:check` will extract tests from
snippets in the documentation and execute the tests. This is included
in `gradle check` so it should happen on CI and during a normal build.

By default each `// AUTOSENSE` snippet creates a unique REST test. These
tests are executed in a random order and the cluster is wiped between
each one. If multiple snippets chain together into a test you can annotate
all snippets after the first with `// TEST[continued]` to have the
generated tests for both snippets joined.

Snippets marked as `// TESTRESPONSE` are checked against the response
of the last action.

See docs/README.asciidoc for lots more.

Closes . That issue is about catching bugs in the docs during build.
This catches *some* bugs in the docs during build which is a good start.
2016-05-05 13:58:03 -04:00
Kelsey DeJesus-Banos 929187c71b Update function-score-query.asciidoc () 2016-05-03 19:29:57 +02:00
Lee Hinman b3bd189cd7 [DOCS] Fix missing table end in function-score-query.asciidoc 2016-03-10 13:35:33 -07:00
Lee Hinman 982a369efc [DOCS] Document the modifiers for `field_value_factor`
Resolves 
2016-03-10 11:34:34 -07:00
Glen Smith f402f427cc Update function-score-query.asciidoc
Make explanatory text match value used in example body

Closes 
2016-01-22 13:02:04 +01:00
Clinton Gormley ac2b8951c6 Docs: Mapping docs completely rewritten for 2.0 2015-08-06 17:24:51 +02:00
Clinton Gormley 765ac45168 Docs: Tidied up function score query docs
Closes 
2015-06-26 17:31:32 +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
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 
2015-05-29 16:52:04 +01:00
Adrien Grand a0af88e996 Query DSL: Remove filter parsers.
This commit makes queries and filters parsed the same way using the
QueryParser abstraction. This allowed to remove duplicate code that we had
for similar queries/filters such as `range`, `prefix` or `term`.
2015-05-07 20:14:34 +02:00