Commit Graph

17972 Commits

Author SHA1 Message Date
Tal Levy 41a953bf8b Merge pull request #15167 from talevy/custom_grok_patterns
add ability to define custom grok patterns within processor config
2015-12-03 08:27:35 -08:00
Tal Levy 56da7b32ed add ability to define custom grok patterns within processor config 2015-12-03 08:24:07 -08:00
Tal Levy cf1c393d70 Merge pull request #15166 from talevy/remove_pattern_utils
move PatternUtils#loadBankFromStream into GrokProcessor.Factory
2015-12-03 08:08:00 -08:00
Martijn van Groningen 6acf8ec263 Removed pipeline tests with a simpler tests
The PipelineTests tried to test if the configured map/list in set processor wasn't modified while documents were ingested. Creating a pipeline programmatically created more noise than the test needed. The new tests in IngestDocumentTests have the same goal, but is much smaller and clearer by directly testing against IngestDocument.
2015-12-03 15:19:04 +01:00
Martijn van Groningen f427ad2094 docs: undo accidental rename added via: 5e07644788 2015-12-02 12:17:43 +01:00
Martijn van Groningen a9ecde041b Merge branch 'master' into feature/ingest 2015-12-02 11:21:15 +01:00
Martijn van Groningen 270a3977bc Removed the lazy cache in DatabaseReaderService and eagerly build all available databases. 2015-12-02 11:16:02 +01:00
David Pilato d23d8a891f Remove "empty" licenses dir
Follow up #15168

We don't need to have "fake" licenses dir anymore.
2015-12-02 10:22:52 +01:00
David Pilato 9c77cdc201 Fix build failure caused by Licenses Check in test-framework module
Typical failure:

```
:test-framework:dependencyLicenses (Thread[main,5,main]) started.
:test-framework:dependencyLicenses
Executing task ':test-framework:dependencyLicenses' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
:test-framework:dependencyLicenses FAILED
:test-framework:dependencyLicenses (Thread[main,5,main]) completed. Took 0.023 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test-framework:dependencyLicenses'.
> Licences dir /mnt/jenkins/workspace/es_core_master_strong/test-framework/licenses does not exist, but there are dependencies
```

Related to #15168
2015-12-02 10:08:35 +01:00
Xavier Coulon 144225f4e5 Fixing typo
Replace "Too shade or not to shade..." with "To shade or not to shade..."

(cherry picked from commit f44c5a4)
(cherry picked from commit 12d5510)
2015-12-02 09:25:52 +01:00
Ryan Ernst 0867d5da28 Merge pull request #15168 from rjernst/precommit_cleanup
Cleanup precommit task gradle code
2015-12-01 23:50:53 -08:00
Ryan Ernst d68c6673a2 Build: Cleanup precommit task gradle code
This change attempts to simplify the gradle tasks for precommit. One
major part of that is using a "less groovy style", as well as being more
consistent about how tasks are created and where they are configured. It
also allows the things creating the tasks to set up inter task
dependencies, instead of assuming them (ie decoupling from tasks
eleswhere in the build).
2015-12-01 22:36:54 -08:00
Tal Levy 767bd1d4d5 move PatternUtils#loadBankFromStream into GrokProcessor.Factory 2015-12-01 15:46:02 -08:00
Robert Muir 9053c9a002 Merge pull request #15149 from rmuir/compact3
compile against compact3 profile
2015-12-01 14:07:34 -05:00
javanna 5e07644788 [DOCS] add missing comma 2015-12-01 20:07:17 +01:00
Ryan Ernst fcb6f44acf Build: Add ability to specify the compact profile for javac 2015-12-01 11:04:46 -08:00
javanna 6c0510b01d Make rename processor less error prone
Rename processor now checks whether the field to rename exists and throws exception if it doesn't. It also checks that the new field to rename to doesn't exist yet, and throws exception otherwise. Also we make sure that the rename operation is atomic, otherwise things may break between the remove and the set and we'd leave the document in an inconsistent state.

Note that the requirement for the new field name to not exist simplifies the usecase for e.g. { "rename" : { "list.1": "list.2"} } as such a rename wouldn't be accepted if list is actually a list given that either list.2 already exists or the index is out of bounds for the existing list. If one really wants to replace an existing field, that field needs to be removed first through remove processor and then rename can be used.
2015-12-01 19:58:24 +01:00
Jason Tedor e52faa81cc Fix typo in field name in MetaDataMappingService 2015-12-01 13:16:28 -05:00
Martijn van Groningen 15b6708a5d and now make use of the lifecycle infrastructure 2015-12-01 18:20:25 +01:00
andrejserafim 9015d0ca73 Fix REST test command line instructions
Closes #15154
2015-12-01 12:18:44 -05:00
Adrien Grand b2fb3a802c Merge pull request #15156 from jpountz/fix/default_type
Don't treat _default_ as a regular type.
2015-12-01 18:14:53 +01:00
Tal Levy 8e4c288b5c Merge pull request #15132 from talevy/no_match_for_grok
[Ingest] No match for grok
2015-12-01 09:13:11 -08:00
Adrien Grand 304695e7ee Don't treat _default_ as a regular type.
This adds safety that you can't index into the `_default_` type (it was possible
before), and can't add default mappers to the field type lookups (was not
happening in tests but I think this is still a good check).

Also MapperService.types() now excludes `_default` so that eg. the `ids` query
does not try to search on this type anymore.
2015-12-01 18:03:11 +01:00
Tal Levy 2c1effdd41 throw exception when grok processor does not match 2015-12-01 08:58:58 -08:00
Martijn van Groningen 9dd52ad7d3 Removed pollution from the Processor.Factory interface.
1) It no longer extends from Closeable.
2) Removed the config directory setter. Implementation that relied on it, now get the location to the config dir via their constructors.
2015-12-01 17:32:37 +01:00
Martijn van Groningen fa9fcb3b11 geo processor should add a list of doubles instead of an array to the ingest document 2015-12-01 17:12:34 +01:00
Adrien Grand 77095a3e97 Merge pull request #15144 from jpountz/fix/ignored_merge_failure
Mappings: Don't ignore merge failures.
2015-12-01 16:37:32 +01:00
Martijn van Groningen 99a4295330 If a list or map value gets set on ingest document a deep copy needs to be made.
If this is not done this can lead to processor configuration being changed by an bulk or index request.
2015-12-01 16:02:04 +01:00
Robert Muir f7e7a6bfad compile against compact3 profile 2015-12-01 09:40:54 -05:00
Christoph Büscher 6f2c36dcb7 Merge pull request #15113 from cbuescher/highligh-builder-refactoring
Make HighlighterBuilder implement Writable, equals and hashCode
2015-12-01 15:28:33 +01:00
Christoph Büscher 027a9b1844 Refactor HighlighterBuilder
This change pulls out the common fields that HighlighterBuilder shares with
its nested Field class into a new abstract CommonHighlighterOptions superclass
which also gets equals() and hashCode() method and methods to serialize the
common fields to a StreamOutput and read them from a stream.

Relates to #15044
2015-12-01 15:17:09 +01:00
javanna c67a332486 Query DSL: Enforce distance is greater than 0 in geo distance query
Validation is not done as part of the distance setter method and tested in GeoDistanceQueryBuilderTests. Fixed GeoDistanceTests to adapt to the new validation.

Closes #15135
2015-12-01 14:07:32 +01:00
Jason Tedor c2e50b010b Merge pull request #15130 from jasontedor/fix-batch-update-mappings
Preserve existing mappings on batch mapping updates
2015-12-01 07:53:23 -05:00
Jason Tedor 13dbed9c92 Add each mapping at most once on batch mapping updates
When creating an index on master for the purpose of updating mappings, a
mapping being updated could needlessly be merged multiple times. This
commit ensures that each mapping is merged at most once while preparing
to update mappings.
2015-12-01 07:52:32 -05:00
Jason Tedor 09006ace11 Add the default mapping at most once on batch mapping updates
When creating an index on master for the purpose of updating mappings,
the default mapping could needlessly be added multiple times. This
commit ensures that the default mapping is added at most once while
preparing to update mappings.
2015-12-01 07:52:32 -05:00
Jason Tedor eea72a6d86 Preserve existing mappings on batch mapping updates
This commit addresses an issues introduced in #14899 to apply mapping
updates in batches. The issue is that an existing mapping for a type
could be lost if that type came in a batch that already contained a
mapping update for another type on the same index. The underlying issue
was that the existing mapping would not be merged in because the merging
logic was only tripped once per index, rather than for all types seeing
updates for each index. Resolving this issue is simply a matter of
ensuring that all existing types seeing updates are merged in.

Closes #15129
2015-12-01 07:52:32 -05:00
David Pilato fb79d064d7 Merge remote-tracking branch 'origin/master' 2015-12-01 12:46:09 +01:00
Adrien Grand cebd7bdd7f Mappings: Don't ignore merge failures. 2015-12-01 12:22:07 +01:00
javanna d17d629422 [TEST] stabilize SimpleSearchIT.testQueryNumericFieldWithRegex
Provide mappings explicitly instead of relying on dynamic mapping, also add missing ensureGreen.

Closes #15105
2015-12-01 12:13:06 +01:00
David Pilato 854099f1d5 Reject refresh usage in bulk items when using and fix NPE when no source
The REST bulk API rejects use of `refresh` at the item level. But the Java API lets the user setting it.

We need to have the same behavior and don't let think the user he can define `refresh` per bulk item.

Note that the user can still define `refresh` on the bulk itself.

Also a user can create with Java API an IndexRequest without any source which is causing a NPE when evaluating the bulk item size.

Closes #7361.
Closes #15120.
2015-12-01 12:00:30 +01:00
Yannick Welsch 059a675aa5 [TEST] mark test as awaitsfix: RareClusterStateIT.testDeleteCreateInOneBulk() 2015-12-01 11:41:51 +01:00
Britta Weber e2f87b0c52 multi field names may not contain dots
related to #14957
2015-12-01 11:27:26 +01:00
Boaz Leskes e256c6fdd1 AwaitsFix testDynamicUpdates
pending on https://github.com/elastic/elasticsearch/issues/15129
2015-12-01 09:57:22 +01:00
Robert Muir b548eb284b Merge pull request #15127 from rmuir/unit_tests_port_0
Fix unit tests to bind to port 0.
2015-11-30 18:12:08 -05:00
Robert Muir 44f21b24d7 Fix unit tests to bind to port 0.
I will followup with ITs and other modules. By fixing this, these tests become more reliable (will never sporatically
fail due to other stuff on your machine: ports are assigned by the OS), and it allows us to move forward with
gradle parallel builds, in my tests this is a nice speedup, but we can't do it until tests are cleaned up
2015-11-30 17:22:58 -05:00
Ryan Ernst 36e1a97b93 Merge pull request #15126 from rjernst/bump_failures_summary
Increase the number of failed tests shown in test summary
2015-11-30 13:47:13 -08:00
Ryan Ernst 4bb1eed766 Build: Increase the number of failed tests shown in test summary
We had increased this in maven, but it was lost in the transition to
gradle. This change adds it as a configurable setting the the logger for
randomized testing and bumps it to 25.
2015-11-30 13:40:39 -08:00
Lee Hinman cc627e41cc Merge pull request #15108 from joschi/editorconfig
Add simple EditorConfig
2015-11-30 09:16:01 -07:00
Clinton Gormley 9dbda2af62 Update scripting.asciidoc
Fix script syntax for script_score

Closes #15096
2015-11-30 17:07:52 +01:00
Honza Král 02798951ef [docs] Updating the Python client docxs 2015-11-30 16:50:08 +01:00