Skip to content

Commit

Permalink
Merge pull request #72 from pksprojects/feature/#65_search_request_en…
Browse files Browse the repository at this point in the history
…hancement

search request enhancement & joining queries support
  • Loading branch information
prafsoni committed Jan 6, 2020
2 parents caa3d68 + 1481c2b commit 19128ae
Show file tree
Hide file tree
Showing 76 changed files with 9,708 additions and 5,577 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,36 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ElasticSwiftCodableUtilsTests"
BuildableName = "ElasticSwiftCodableUtilsTests"
BlueprintName = "ElasticSwiftCodableUtilsTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "UnitTestSettings"
BuildableName = "UnitTestSettings"
BlueprintName = "UnitTestSettings"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ElasticSwiftQueryDSLTests"
BuildableName = "ElasticSwiftQueryDSLTests"
BlueprintName = "ElasticSwiftQueryDSLTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
24 changes: 12 additions & 12 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@
"repositoryURL": "https://github.com/swift-server/async-http-client.git",
"state": {
"branch": null,
"revision": "51dc885a30ca704b02fa803099b0a9b5b38067b6",
"version": "1.0.0"
"revision": "48e284d1ea6d0e8baac1af1c4ad8bd298670caf6",
"version": "1.0.1"
}
},
{
"package": "swift-log",
"repositoryURL": "https://github.com/apple/swift-log.git",
"state": {
"branch": null,
"revision": "e8aabbe95db22e064ad42f1a4a9f8982664c70ed",
"version": "1.1.1"
"revision": "74d7b91ceebc85daf387ebb206003f78813f71aa",
"version": "1.2.0"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "8066b0f581604e3711979307a4377457e2b0f007",
"version": "2.9.0"
"revision": "f6487a11d80bfb9a0a0a752b7442847c7e3a8253",
"version": "2.12.0"
}
},
{
"package": "swift-nio-extras",
"repositoryURL": "https://github.com/apple/swift-nio-extras.git",
"state": {
"branch": null,
"revision": "ed97628fa310c314c4a5cd8038445054b2991f07",
"version": "1.3.1"
"revision": "53808818c2015c45247cad74dc05c7a032c96a2f",
"version": "1.3.2"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "e5c1af45ac934ac0a6117b2927a51d845cf4f705",
"version": "2.4.3"
"revision": "b75ffaba05b2cffdb1420d558f1a90b4e6c46dcc",
"version": "2.5.0"
}
},
{
"package": "swift-nio-transport-services",
"repositoryURL": "https://github.com/apple/swift-nio-transport-services.git",
"state": {
"branch": null,
"revision": "e30bf63ea1b47132de05771216ccd1e2a5123bd0",
"version": "1.2.0"
"revision": "c7f06384dc5ce7e8506de5ed9b59e35b4d88c64b",
"version": "1.3.0"
}
}
]
Expand Down
62 changes: 44 additions & 18 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,81 @@ let package = Package(
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "ElasticSwift",
targets: ["ElasticSwift"]),
targets: ["ElasticSwift"]
),
.library(
name: "ElasticSwiftQueryDSL",
targets: ["ElasticSwiftQueryDSL"]),
targets: ["ElasticSwiftQueryDSL"]
),
.library(
name: "ElasticSwiftNetworkingNIO",
targets: ["ElasticSwiftNetworkingNIO"]),
targets: ["ElasticSwiftNetworkingNIO"]
),
.library(
name: "ElasticSwiftNetworking",
targets: ["ElasticSwiftNetworking"]),
targets: ["ElasticSwiftNetworking"]
),
.library(
name: "ElasticSwiftCore",
targets: ["ElasticSwiftCore"]),
targets: ["ElasticSwiftCore"]
),
.library(
name: "ElasticSwiftCodableUtils",
targets: ["ElasticSwiftCodableUtils"]),
targets: ["ElasticSwiftCodableUtils"]
),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.9.0")),
.package(url: "https://github.com/apple/swift-nio-ssl.git", .upToNextMajor(from: "2.4.3")),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.1.1")),
.package(url: "https://github.com/swift-server/async-http-client.git", .upToNextMajor(from: "1.0.0"))
.package(url: "https://github.com/apple/swift-nio.git", .upToNextMajor(from: "2.12.0")),
.package(url: "https://github.com/apple/swift-nio-ssl.git", .upToNextMajor(from: "2.5.0")),
.package(url: "https://github.com/apple/swift-nio-transport-services.git", .upToNextMajor(from: "1.3.0")),
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/swift-server/async-http-client.git", .upToNextMajor(from: "1.0.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "ElasticSwift",
dependencies: ["ElasticSwiftCore", "ElasticSwiftQueryDSL", "ElasticSwiftCodableUtils", "Logging", "NIOHTTP1", "NIOConcurrencyHelpers"]),
dependencies: ["ElasticSwiftCore", "ElasticSwiftQueryDSL", "ElasticSwiftCodableUtils", "Logging", "NIOHTTP1", "NIOConcurrencyHelpers"]
),
.target(
name: "ElasticSwiftQueryDSL",
dependencies: ["ElasticSwiftCore", "ElasticSwiftCodableUtils", "Logging"]),
dependencies: ["ElasticSwiftCore", "ElasticSwiftCodableUtils", "Logging"]
),
.target(
name: "ElasticSwiftNetworkingNIO",
dependencies: ["ElasticSwiftCore", "Logging", "NIO", "NIOHTTP1", "AsyncHTTPClient", "NIOFoundationCompat", "NIOSSL", "NIOTransportServices", "NIOConcurrencyHelpers"]),
dependencies: ["ElasticSwiftCore", "Logging", "NIO", "NIOHTTP1", "AsyncHTTPClient", "NIOFoundationCompat", "NIOSSL", "NIOTransportServices", "NIOConcurrencyHelpers"]
),
.target(
name: "ElasticSwiftNetworking",
dependencies: ["ElasticSwiftCore", "Logging", "NIOHTTP1"]),
dependencies: ["ElasticSwiftCore", "Logging", "NIOHTTP1"]
),
.target(
name: "ElasticSwiftCore",
dependencies: ["Logging", "NIOHTTP1"]),
dependencies: ["Logging", "NIOHTTP1"]
),
.target(
name: "ElasticSwiftCodableUtils",
dependencies: []),
dependencies: []
),
.testTarget(
name: "ElasticSwiftTests",
dependencies: ["ElasticSwift", "ElasticSwiftQueryDSL", "ElasticSwiftCore", "ElasticSwiftCodableUtils", "ElasticSwiftNetworkingNIO", "ElasticSwiftNetworking"]),
dependencies: ["ElasticSwift", "ElasticSwiftQueryDSL", "ElasticSwiftCore", "ElasticSwiftCodableUtils", "ElasticSwiftNetworkingNIO", "ElasticSwiftNetworking", "UnitTestSettings"]
),
.testTarget(
name: "ElasticSwiftCodableUtilsTests",
dependencies: ["ElasticSwiftCodableUtils", "Logging", "UnitTestSettings"]
),
.testTarget(
name: "ElasticSwiftQueryDSLTests",
dependencies: ["ElasticSwiftQueryDSL", "Logging", "UnitTestSettings"]
),
.target(
name: "UnitTestSettings",
dependencies: ["Logging"],
path: "Tests/UnitTestSettings"
),
]
)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,8 @@ Below Table lists all the available search queries with their corresponding Quer
| FuzzyQuery | FuzzyQueryBuilder | QueryBuilders.fuzzyQuery() |
| TypeQuery | TypeQueryBuilder | QueryBuilders.typeQuery() |
| IdsQuery | IdsQueryBuilder | QueryBuilders.idsQuery() |
| NestedQuery | NestedQueryBuilder | QueryBuilders.nestedQuery() |
| HasChildQuery | HasChildQueryBuilder | QueryBuilders.hasChildQuery() |
| HasParentQuery | HasParentQueryBuilder | QueryBuilders.hasParentQuery() |
| ParentIdQuery | ParentIdQueryBuilder | QueryBuilders.parentIdQuery() |

7 changes: 3 additions & 4 deletions Sources/ElasticSwift/Clients/Clusters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ import Logging
///
/// [Cluster API on elastic.co](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html)
public class ClusterClient {

private let logger = Logger(label: "org.pksprojects.ElasticSwfit.Clients.ClusterClient")

/// the elasticsearch client
let client: ElasticClient

/// Initializes new indices client
/// - Parameter withClient: the elasticsearch client
init(withClient: ElasticClient) {
self.client = withClient
client = withClient
}
}
Loading

0 comments on commit 19128ae

Please sign in to comment.