Commit Graph

2861 Commits

Author SHA1 Message Date
Shay Banon 74bfa27e7e Fail geohash_cell filter if geohash prefix is not enabled
closes #4335
2013-12-04 13:16:55 +01:00
Martijn van Groningen eacbd8f88d Fixed parsing bug in percolator, where everything after the `doc` object was skipped.
Closes #4325
2013-12-04 01:11:24 +01:00
Adrien Grand 346d8efeb5 Fix implementation of currentValueHash in FieldDataSource.Bytes.SortedAndUnique.
Close #4330
2013-12-04 00:42:24 +01:00
Andrew Raines 9e4b5ea242 Introduce abstract superclass, group cat module bindings, and short-circuit helps. 2013-12-03 18:32:12 -05:00
Shay Banon adef349f74 MetaData to use new iterator in ImmutableOpenMap 2013-12-03 22:43:25 +01:00
Shay Banon fd014473d0 expose key and value iterators in ImmutableOpenMap 2013-12-03 22:29:54 +01:00
uboness 84d7929c3b - removed the getKeyAsString method from StringTerms (redundant method) 2013-12-03 18:18:23 +01:00
Martijn van Groningen 5fb15d3afa The registered queries were loaded after shard went to started phase, this resulted in the situation that the percolate api could be used while the registered queries still needed to be loaded from disk.
The newly added afterIndexShardPostRecovery method to InternalIndicesLifecycle, that the percolator now uses to trigger the loading of the registered queries will make sure that a shard doesn't go to started state before the queries have been loaded.
The percolate api (like other apis) will retry the execution on a different shard copy if a shard isn't in a started state preventing empty results if there registered queries to be loaded. Percolator tests fail sometimes for this reason.
2013-12-03 15:10:36 +01:00
Martijn van Groningen 9d1e3a7256 Added test logging 2013-12-03 11:27:27 +01:00
Nik Everett 8e34057bc0 Add support for combining fields to the FVH
The Fast Vector Highlighter can combine matches on multiple fields to
highlight a single field using `matched_fields`.  This is most
intuitive for multifields that analyze the same string in different
ways.  Example:
{
    "query": {
        "query_string": {
            "query": "content.plain:running scissors",
            "fields": ["content"]
        }
    },
    "highlight": {
        "order": "score",
        "fields": {
            "content": {
                "matched_fields": ["content", "content.plain"],
                "type" : "fvh"
            }
        }
    }
}

Closes #3750
2013-12-03 11:10:01 +01:00
Adrien Grand df08894b53 Fix broken test. 2013-12-03 10:57:11 +01:00
Alexander Reelsen 7c96627d76 Remove bash specific calls
Make sure that every call in a shell script is supported by /bin/sh and not a bashism, like $()

Closes #4314
2013-12-03 10:23:40 +01:00
Nik Everett 7690b40ec6 Allow string fields to store token counts
To use this one you send a string to a field of type 'token_count'.  This
makes the most sense with a multi-field.
2013-12-03 09:39:32 +01:00
Martijn van Groningen 43691bb735 Removed shortCircuit in MatchDocIdSet since it is no longer used. 2013-12-02 18:28:27 +01:00
Simon Willnauer 2c8ee3fbbe Moving to 1.0.0RC1 snap 2013-12-02 17:10:07 +01:00
Kevin Kluge 296cfbe390 release [1.0.0.Beta2] 2013-12-02 15:45:30 +00:00
Martijn van Groningen 5488bab003 Use EA#assertMatchCount() over just checking the match count. 2013-12-02 14:50:00 +01:00
Simon Willnauer e18bee50ef User minimum_master_nodes in tests that shutdown nodes some of those time out on Windows 2013-12-02 13:04:13 +01:00
Martijn van Groningen cf63ea212f Use EA#assertMatchCount() over just checking the match count. 2013-12-02 12:12:04 +01:00
uboness 2f835621ae added more wait for green status on aggs tests 2013-12-02 11:42:51 +01:00
Martijn van Groningen a1d58bf486 fix mapping error in p/c benchmarks 2013-12-02 11:31:31 +01:00
Martijn van Groningen 809c7d07f0 only wrap the parentFilter in ApplyAcceptedDocsFilter, not the other short circuit filters. 2013-12-02 11:05:55 +01:00
uboness cdc7dfbb2c Changed the "script_lang" parameter to "lang" in all value source based aggs - to be consistent with all other script based APIs. 2013-12-02 02:01:03 +01:00
Martijn van Groningen 079ac79617 Added random filtered query logic the to random parent query tests.
Fixed bug in ParentQuery.ChildScorer#advance(), the parent value was checked for the _uid field while the _parent should have been checked.
2013-12-02 00:18:59 +01:00
Martijn van Groningen 292e53fe77 The short circuit mechanism always needs to be wrapped with the live docs. In certain scenarios the live docs isn't passed down with acceptedDocs.
For example when a has_child is wrapped in a filtered query as query and the wrapped filter is cached.
The short circuit mechanism in that case counts down based on deleted docs, which then yields lower results than is expected.

Relates to #4306
2013-12-02 00:18:59 +01:00
Simon Willnauer 27f9f9bdb4 Log intermediate pending searchers as trace instead of debug 2013-12-01 19:44:56 +01:00
Simon Willnauer d2bd476e70 add more ensureGreen to aggs tests 2013-12-01 18:58:39 +01:00
Martijn van Groningen 04675f85cf Make the ChildrenQuery and ParentQuery not rely on the fact that score of 0 means that there isn't a match. 2013-12-01 17:22:58 +01:00
Martijn van Groningen 1285894f5f Also short circuit within segment when score mode is avg 2013-12-01 16:44:19 +01:00
Martijn van Groningen ac1e985670 Fixes related to accepted docs not taken into account:
* Removed the applyAcceptedDocs in ChildrenConstantScoreQuery, they need to be applied at all times. (because of short circuit mechanism)
* Moved ParentDocSet to FilteredDocIdSetIterator, because it fits better than MatchDocIdSet.
* Made similar changes to ParentConstantScoreQuery for consistency between the two queries. The bug accepted docs bug didn't occur in the ParentConstantScoreQuery.
* Updated random p/c tests to randomly update parent or child docs during the test run.

Closes #4306
2013-11-30 20:05:55 +01:00
Simon Willnauer 5d2c334bbd wait for green in tests for now 2013-11-30 19:41:49 +01:00
Alexander Reelsen 971b828e76 Cat API: Improve help and execute help before sending server requests
* Force the cat API classes to have simple help available by extending from a AbstractCatAction
* Use a set binder on guice creation to create the help on node start up
* Make sure that the help/field info is returned without querying any data
2013-11-30 16:22:30 +01:00
uboness 88d829ad78 added more assertions to aggs tests 2013-11-30 05:44:04 +01:00
uboness efea1298cd added assertions for shard failures in stats agg tests 2013-11-30 03:58:11 +01:00
Shay Banon ed01d53506 NullPointerException in FsTranslog when reverting transient log
This happens when reverting the trans transaction log on failure, and when that happens, actually we might have failed on the transient translog creation to being with....
fixes #4223
2013-11-30 00:30:32 +01:00
Luca Cavanna fe1d22af01 trimmed down SimpleQueryTests + more assertAcked 2013-11-29 21:15:28 +01:00
Luca Cavanna de206e72f1 Added simple test for minScore 2013-11-29 20:35:40 +01:00
Clinton Gormley bc393b6d79 Changed the minScore comparator from > to >=
Closes #4303
2013-11-29 20:29:20 +01:00
Adrien Grand 65541e6912 Fix computation of explanations for AllTermQuery.
The use of freq() instead of sloppyFreq() and the fact that `numMatches` was
not updated in `setFreqCurrentDoc` could lead to an inaccurate score in the
explanation.

Close #4298
2013-11-29 19:24:56 +01:00
Benjamin Devèze c20d4bb69e Add line feed for prettified main REST action 2013-11-29 16:42:50 +01:00
Luca Cavanna 8e54319a1d test classes cleanup (fixed warnings and typos) 2013-11-29 16:22:20 +01:00
Luca Cavanna b214943522 fixed typo in TestCluster 2013-11-29 14:55:24 +01:00
uboness 0d6a35b9a7 - Added support for term filtering based on include/exclude regex on the terms agg
- Added javadoc to the TermsBuilder

Closes #4267
2013-11-29 13:46:48 +01:00
Luca Cavanna 630641f292 Refactored put mapping api to make use of the new recently introduced generic ack mechanism
Note: we were previously waiting for ack only from all nodes that contain shards for the indices that the mapping updatewas applied to. This change introduces a wait for ack from all nodes, consitent with other api as the ack is meant more on the cluster state itself, which is held by all nodes and needs to be updated on all nodes anyway.

Closes #4228
2013-11-29 11:39:23 +01:00
Alexander Reelsen 0ec3eaf53d Completion postings format: Write hole character
Another issue found by randomized testing.
2013-11-29 10:40:33 +01:00
Andrew Raines 28ecafac11 Display placeholder for non-master-eligible nodes. 2013-11-29 02:35:45 -06:00
Andrew Raines 455c92d27b Check for load avg before attempting to display. 2013-11-29 02:32:54 -06:00
Andrew Raines 9aee9949e5 Convert _cat/count to TimestampedTable. 2013-11-29 02:19:56 -06:00
Andrew Raines d16aacb8d3 Supply field descriptions for TimestampedTable. 2013-11-29 02:19:15 -06:00
Andrew Raines 91999e14ce Add _cat/pending_tasks.
Closes #4251.
2013-11-29 01:09:06 -06:00