chewy_queries 0.0.3 → 0.0.4

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
  SHA256:
3
- metadata.gz: 8a44148fe1c365c4907380ecba044b436611e67b62ffc55a86275a52097bf1f8
4
- data.tar.gz: 3f78b696b02be625c741a6a695a2837d691bdbd3aac9f9f584c902fa9db680d8
3
+ metadata.gz: 990c8bb612f6b79f93019924a8c6aea863254df480f0329439bb5ce8ff953226
4
+ data.tar.gz: 68974713009f8dc894192431dd2d6226d72a1938245b3ae31cb5d731c30c1eeb
5
5
  SHA512:
6
- metadata.gz: b07b58608223b4aec4bf6af95202308baaf1539c68fc294a915e64b9c565b57fbccee639a8f3e14bd9394bf710faa0e7e2745269c050a35e853d6cd5a3f150bf
7
- data.tar.gz: 3f02574c67a4e79eaaaac29c3b18d36b3cd00318a36cf1224fe05487aaac92d3820e514e5c64b55ee6b677aee29bafaca09fae899e91375a4da113c4684f899b
6
+ metadata.gz: b18a547340987f3d104856a45667be62f90bfaaba8b5481c4512dd974bbdf8f9d53988a69160dc8b65e087764626cd3eb2a374aab430e941e7628b4e3952341e
7
+ data.tar.gz: 9cfc21c59c8625368e3df7fe9a25ac389be2a15c9929a18cc8a4df24fb684c082e3c5ecf6d80869d29cd2839cf4edcf61669af6c64e16c6753abe76663a618bb
data/README.md CHANGED
@@ -30,6 +30,7 @@ gem install chewy_queries
30
30
 
31
31
  ## Search query requires the following
32
32
 
33
+
33
34
  ```ruby
34
35
  def ChewyQueries.search(class_name, type, condition, value, field)
35
36
  # some elastic queries
@@ -38,15 +39,19 @@ gem install chewy_queries
38
39
 
39
40
  Above method includes all possible elastic queries to get the search result.
40
41
 
41
- ## method explaination
42
- ## type is Fields types i.e:-
42
+ ## Each argument explanation
43
+
44
+ ## 1)type is fields types:
45
+ ```
43
46
  1)text
44
47
  2)number
45
48
  3)date
49
+ ```
46
50
 
47
- ## Condition required for each fields
51
+ ## 2)Condition required for each fields:
48
52
 
49
- ### 1)text field
53
+ ### a)text field
54
+ ```
50
55
  1)equal
51
56
  2)not equal
52
57
  3)contains
@@ -56,8 +61,9 @@ Above method includes all possible elastic queries to get the search result.
56
61
  7)ends with
57
62
  8)does not end with
58
63
  9)matches exactly
59
-
60
- ### 2)number field
64
+ ```
65
+ ### b)number field
66
+ ```
61
67
  1)Is equal to
62
68
  2)Is not equal to
63
69
  3)Is greater than
@@ -65,8 +71,9 @@ Above method includes all possible elastic queries to get the search result.
65
71
  5)Is provided
66
72
  6)Is not provided
67
73
  7)Is between
68
-
69
- ### 3)date field
74
+ ```
75
+ ### c)date field
76
+ ```
70
77
  1)Is before
71
78
  2)Is after
72
79
  3)Is on or before
@@ -76,18 +83,30 @@ Above method includes all possible elastic queries to get the search result.
76
83
  7)Is provided
77
84
  8)Is not provided
78
85
  9)Is between
86
+ ```
79
87
 
80
- ## value should be your search value
81
- ## field should be your search filed
82
-
83
- ## Note:This gem will give maximum 10 result if you want more than 10 you can use limit(limit(1000)) after calling methods.
88
+ ## 3)value should be your search value
84
89
 
90
+ ## 4)field should be your search filed
85
91
 
86
92
  ## Example
87
93
 
88
94
  ```ruby
89
- ChewyQueries.search(ContactIndex, "number", "Is equal to", 23, "age").limit(Contact.count)
90
- #limit is get more than 10 result
91
-
95
+ #for search
96
+ ChewyQueries.search(ContactIndex, "number", "Is equal to", 23, "age").limit(Contact.count)
97
+
98
+ #Note:limit is to get morethan 10 result
99
+
100
+ #for exact_match_search
101
+ ChewyQueries.exact_match_search(ContactIndex,"email","rakesh@example.com")
102
+
103
+ #for multiple_field_search
104
+ ChewyQueries.multiple_field_search(ContactIndex,["first_name","last_name","full_name"],"rakesh")
105
+
106
+ #for partial_search
107
+ ChewyQueries.partial_search(ContactIndex,"first_name","rak")
108
+
109
+
92
110
  ```
93
111
 
112
+
@@ -1,3 +1,3 @@
1
1
  module ChewyQueries
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chewy_queries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rakesh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-07 00:00:00.000000000 Z
11
+ date: 2021-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem help you to find the query for chewy gem
14
14
  email: