gitlab-elasticsearch-git 1.1.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f92a3114627d7479e95001ac6e83ff8dc8b31df
4
- data.tar.gz: 7c4fe7e7d2692fb813b61bd73f22f4270b9e2c0c
3
+ metadata.gz: 550905668d72d27f4074ab2a6de5e449740d1fb4
4
+ data.tar.gz: c8ccdb0c3590f912303b846076161fbabb28fb71
5
5
  SHA512:
6
- metadata.gz: f0bb24885a18b991a8fb63a4e671f9204a108dc892d368658b6de21f7daded1ff5c8d3c6f950103f910595aee608feae5c753d908304fb522e24be14c70293ab
7
- data.tar.gz: 66fed2886c133d66bbeb186f2a232c2399d5876efa515b8cfe12f3aa85c8f3d3f2ea8a6ed09d7ae4cd6211f374a8dcc4dfa3f00d6f8627e36a0a58f6a0804048
6
+ metadata.gz: a96fdf7ec58ad80698e8aba72b13036b4bf919581c6f215dda28973f4f05853b26aa49fce19bf828e7cc3870423508041a1bc1230cf5d27cd95cf15eb4cc52fc
7
+ data.tar.gz: 3da488a15c3968dff44c73f1f376d58dabe8210410dadfaf36f862ea9f8e61be91ac19a7c31ceb2d2032b717aadc98b234a36b3f685affb3055d35d99c70622c
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
+ 1.2.0
2
+ - Support advanced search syntax
3
+
1
4
  1.1.1
2
5
  - Support for ES 5.0
3
-
6
+
4
7
  1.0.2
5
8
  - Cache commit's author and committer when indexing a commit
6
9
 
@@ -417,10 +417,10 @@ module Elasticsearch
417
417
  query: {
418
418
  bool: {
419
419
  must: [{
420
- multi_match: {
420
+ simple_query_string: {
421
421
  fields: fields,
422
422
  query: query,
423
- operator: :or
423
+ default_operator: :or
424
424
  }
425
425
  }]
426
426
  }
@@ -478,9 +478,9 @@ module Elasticsearch
478
478
  query: {
479
479
  bool: {
480
480
  must: {
481
- multi_match: {
481
+ simple_query_string: {
482
482
  query: query,
483
- operator: :and,
483
+ default_operator: :and,
484
484
  fields: [ 'blob.content', 'blob.file_name' ]
485
485
  }
486
486
  }
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Git
3
- VERSION = '1.1.1'
3
+ VERSION = '1.2.0'
4
4
  end
5
5
  end
@@ -63,6 +63,13 @@ describe TestRepository do
63
63
  expect(found_version_file).to be_truthy
64
64
  end
65
65
 
66
+ it "supports advanced search syntax" do
67
+ repo.index_blobs
68
+ TestRepository.__elasticsearch__.refresh_index!
69
+
70
+ expect(repo.search('def +(popen | username_regex)')[:blobs][:total_count]).to eq(2)
71
+ end
72
+
66
73
  it "indexes specified commits" do
67
74
  repo.index_commits(
68
75
  from_rev: '40f4a7a617393735a95a0bb67b08385bc1e7c66d',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-elasticsearch-git
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Kumanyaev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-09 00:00:00.000000000 Z
13
+ date: 2017-05-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: elasticsearch-model