Commit Graph

5397 Commits

Author SHA1 Message Date
Simon Willnauer 7c76819040 Randomize numeric types in MLT test and apply mapping ahead of time. 2013-08-23 18:04:52 +02:00
Britta Weber 8b9396b6da add additional method for setting combine mode with CombineFunction parameter 2013-08-23 16:04:00 +02:00
Britta Weber 8d6dc5908e add builders for nicer java api
This commit and the previous 10 commits close issue 3533.

Closes #3533
2013-08-23 16:03:23 +02:00
Britta Weber 5258940d9e format code 2013-08-23 14:44:34 +02:00
Britta Weber 1b085b069b rename reference -> origin 2013-08-23 14:44:34 +02:00
Britta Weber 9e7ad7249f rename scale_weight -> decay 2013-08-23 14:44:34 +02:00
Britta Weber 41b4a14933 Add offset to decay function score
Docs within the offset will be scored with 1.0, decay only starts after
offset is reached.
2013-08-23 14:44:22 +02:00
Britta Weber c0288a62e6 rename 'total' to 'sum', both enum and for query 2013-08-23 14:44:01 +02:00
Britta Weber 6035134047 add more combine functions and rename PLAIN to REPLACE 2013-08-23 14:44:01 +02:00
Britta Weber db100aa2de make GeoPoint parsable in lat/lon json format 2013-08-23 14:43:54 +02:00
Britta Weber f125ac122c format code 2013-08-23 13:55:14 +02:00
Britta Weber 41c59c6b49 make mult default boost mode
always multiply query score to function score. For script score
functions, this means that boost_mode has to be set to `plain` if
'function_score' should behave like 'custom_score'
2013-08-23 13:55:14 +02:00
Britta Weber 634f1036a0 add boost_mode to rest interface
allow user to set combine functions explicitely via boost_mode variable.
2013-08-23 13:55:14 +02:00
Britta Weber b007af1f46 Fix inconsistent usage of ScriptScoreFunction in FiltersFunctionScoreQuery
This commit fixes inconsistencies in `function_score` and `filters_function_score`
using scripts, see issue #3464

The method 'ScoreFunction.factor(docId)' is removed completely, since the name
suggests that this method actually computes a factor which was not the case.
Multiplying the computed score is now handled by 'FiltersFunctionScoreQuery'
and 'FunctionScoreQuery' and not implicitely performed in
'ScoreFunction.factor(docId, subQueryScore)' as was the case for 'BoostScoreFunction'
and 'DecayScoreFunctions'.

This commit also fixes the explain function for FiltersFunctionScoreQuery. Here,
the influence of the maxBoost was never printed. Furthermore, the queryBoost was
printed as beeing multiplied to the filter score.

Closes #3464
2013-08-23 13:55:14 +02:00
Alexander Reelsen 2b03bc83a4 Dont write pidfile twice on startup
There is no need to write the pidfile in the bin/elasticsearchshell script
as this happens already in the java code.

Also cleaning up the bin/elasticsearch shell script a bit (no need to return
an error code when exec is called, as this forks and exits the shell script
immediately).

Closes #3529
Closes #1745
2013-08-23 13:20:29 +02:00
Shay Banon 1ac00a13fb cleanup removable of reject_policy 2013-08-23 12:15:47 +02:00
Louis Gueye 048a02eebc Debian init script: Add debian default java location
Adding /usr/lib/jvm/default-java to JAVA_HOME candidates to check

Closes #3500
2013-08-23 11:27:12 +02:00
Martijn van Groningen e173f9a369 Added test for verifying the id cache size if the clear cache api is invoked. 2013-08-23 10:04:13 +02:00
Dan Everton c76e589bc5 Call onRemoval of shard IdCache during clear.
This looks like a copy/paste issue where onCached was being called
rather than onRemoval. This should fix the ID cache stats not being
correct after a call to /_cache/clear?id_cache=true
2013-08-23 09:55:51 +02:00
uboness 4b3a883111 random_score function - Added the index name and shard id to the randomization, and improved the PRNG itself
Closes #3559
2013-08-23 02:48:43 +02:00
Boaz Leskes 109e2944f2 ClusterUpdateSettingsAction will hang if no changes were made
Closes #3560
2013-08-22 20:59:31 +02:00
Simon Willnauer fc3133d087 Prevent NPE if all docs for the field are pruned during merge
During segment merges FieldConsumers for all fields from the source
segments are created. Yet, if all documents that have a value in a
certain field  are deleted / pruned during the merge the FieldConsumer
will not be called at all causing the internally used FST Builder to
return `null` from it's `build()` method. This means we can't store
it and run potentially into a NPE. This commit adds handling for
this corner case both during merge and during suggest phase since
we also don't have a Lookup instance for this segments field.

Closes #3555
2013-08-22 11:59:25 +02:00
Martijn van Groningen 7fda12316a Properly reduce in onFailure 2013-08-21 23:57:15 +02:00
David Pilato 352d2aaf18 Plugin Manager can not download _site plugins from github
Sounds like github changes a bit download url for master zip file.

From `https://github.com/username/reponame/zipball/master` to `https://github.com/username/reponame/archive/master.zip`.

We need to update plugin manager to reflect that change.

In the meantime, we invite users having this issue to use:

```sh
bin/plugin -install reponame -url https://github.com/username/reponame/archive/master.zip
```

For example:

```sh
bin/plugin -install paramedic -url https://github.com/karmi/elasticsearch-paramedic/archive/master.zip
```

Closes #3551
2013-08-21 17:44:08 +02:00
David Pilato 8668479b92 Plugin Manager can not download _site plugins from github
Sounds like github changes a bit download url for master zip file.

From `https://github.com/username/reponame/zipball/master` to `https://codeload.github.com/username/reponame/zip/master`.

We need to update plugin manager to reflect that change.

In the meantime, we invite users having this issue to use:

```sh
bin/plugin -install reponame -url https://codeload.github.com/username/reponame/zip/master
```

For example:

```sh
bin/plugin -install paramedic -url https://codeload.github.com/karmi/elasticsearch-paramedic/zip/master
```

Closes #3551
2013-08-21 16:08:00 +02:00
Shay Banon 25d28f8afa Completion Suggester: Allow payload to be a value
closes #3550
2013-08-21 15:33:52 +02:00
Alexander Reelsen 210683d70b Checking for paylods as JSON objects in completion suggester
If the payload is not a JSON object on indexation, an exception will be thrown.
2013-08-21 14:25:49 +02:00
Alexander Reelsen cdddbb7585 Expose size statistics for completion suggest
In order to determine how many RAM the completion suggest structures will eat up, this data should be exposed.

Closes #3522
2013-08-21 13:15:38 +02:00
David Pilato ac3d5d67be Adding Contributing guidelines 2013-08-21 11:27:32 +02:00
Shay Banon b9c8ca8071 Smarter default to `index.index_concurrency`
closes #3546
2013-08-20 22:26:42 +02:00
Shay Banon d442e089ac Bound processor size based cals to 32
We use number of processors to choose default thread pool sizes, and number of workers in networking (for HTTP and transport). Bound it to max at 32 by default as a safety measure to create too many threads.

This relates to #3478, where we set the default to 24, but 32 is probably a better default.

closes #3545
2013-08-20 22:17:26 +02:00
Simon Willnauer 9af7a850e9 Prevent FVH from entering a very long running loop on large docs with high freq phrase terms.
Terminate phrase searches early if max phrase window is exceeded in
FastVectorHighlighter to prevent very long running phrase
extraction if phrase terms are high frequent. See LUCENE-5182

Closes #3543
2013-08-20 17:54:34 +02:00
Benjamin Devèze 65056a63a1 Share shards computation logic between searchShards and searchShardsCount 2013-08-20 15:52:14 +02:00
uboness 7dab7ab585 when doing range queries within a query_string query, the range terms should only be lowercased if the field is not numeric
fixes #3540
2013-08-20 14:19:08 +02:00
Luca Cavanna 3b03bc65b9 Renamed readable_format flag to human
Closes #3541
2013-08-20 13:43:36 +02:00
Lee Hinman 81bee86778 Add the /_cat/count and /_cat/count/{index} API.
The cat count API allows retrieving the count of all docs in the
cluster, or docs in specific indices, in a human-readable format.
2013-08-19 17:18:36 -06:00
Martijn van Groningen 5ec0276fc5 Improved multi percolate api, to bundle all the requests by shard into one shard level request instead of sending each percolate request separately to the shards. 2013-08-19 18:59:48 +02:00
Boaz Leskes 11fab5c66f XContentHelper.mergeDefaults with single key object list ([ { key: .. } , {key : ... } .. ] ) didn't add defaults which were not already in content
Closes #3538
2013-08-19 17:57:22 +02:00
Luca Cavanna 7f7f79d622 Added test for #3268 and comments to test for #2682 2013-08-19 17:39:24 +02:00
Benjamin Devèze 8e137b1450 Fix search shards count method when targeting concrete and routing-aliased indices 2013-08-19 17:39:24 +02:00
Boaz Leskes 28e867b5c1 Change response format of term vector endpoint
This commit changes the response format of the term vectors
to be consistent with the response format of the analyze endpoint.

```
{
   "_index": "test",
   "_type": "type1",
   "_id": "1",
   "_version": 1,
   "exists": true,
   "term_vectors": {
      "field_with_positions_offsets": {
         "field_statistics": {..},
         "terms": {
            "evil": {
               "term_freq": 2,
               "pos": [ 4 , 7 ],
               "start": [ 17, 40 ],
               "end": [ 21 , 44 ]
            },
            "orthodontist": {
               "term_freq": 1,
               "pos": [ 5 ]
               ],
               "start": [ 22 ],
               "end": [ 34]
            }
         }
      }
   }
}
```

becomes

```
{
   "_index": "test",
   "_type": "type1",
   "_id": "1",
   "_version": 1,
   "exists": true,
   "term_vectors": {
      "field_with_positions_offsets": {
         "field_statistics": {..},
         "terms": {
            "evil": {
               "term_freq": 2,
               "tokens": [
                   { "position": 4, "start_offset": 17, "end_offset" : 21 },
                   { "position": 7, "start_offset": 40, "end_offset" : 44 }
               ]
            },
            "orthodontist": {
               "term_freq": 1,
               "tokens" : [ { "position": 5 , "start_offset" : 22, "end_offset" : 34 } ]
            }
         }
      }
   }
}
```

Closes issue #3484
2013-08-19 16:31:59 +02:00
Boaz Leskes cd5ebac7dd GetMapping failed when index had no mapping (yet)
Closes #3534
2013-08-19 15:51:10 +02:00
Shay Banon 103059d9ef use the now publicly available getDisjuncts 2013-08-19 15:01:14 +02:00
Boaz Leskes b1ac8e9027 Switched all catch (Exception e) to catch (Throwable e) 2013-08-19 14:07:13 +02:00
Boaz Leskes 097b4078a4 added a top level try catch for threaded operations. Exception which bubbled up could cause requests to hang. 2013-08-19 13:41:21 +02:00
Shay Banon 67787421b2 increase (use default) timeout to green in test 2013-08-19 10:18:51 +02:00
Shay Banon 616b09e9b4 Thread Pool: Remove blocking type option
The blocking thread pool type is not recommended to be used, since it will end up blocking the IO thread most times when executing, which is not recommended (other operations will then stall as well).
closes #3531
2013-08-18 22:28:51 +02:00
Boaz Leskes 766c787737 Changed the default of SourceFieldMapper's includes & excludes to be null, to support a "not specified" state, which is important now that they are update-able & merge-able 2013-08-18 11:05:21 +02:00
Simon Willnauer e83eb49a80 Fix RandomScoreFunctionTests to be more reproducible. 2013-08-18 08:39:11 +02:00
uboness 91e78dcbe8 fixed RandomScoreFunctionTests 2013-08-17 23:42:01 +02:00