1
+ <img align =" left " width =" 70 " height =" 70 " src =" https://cdn.snipform.io/pdphilip/opensearch/laravel_opensearch.png " >
1
2
# Laravel-OpenSearch
2
3
3
- ** This package has been built off the back of the original [ Elasticsearch version] ( https://github.com/pdphilip/laravel-elasticsearch ) of this package since v3.11.0**
4
+ > ** This package has been built off the back of the original [ Elasticsearch version] ( https://github.com/pdphilip/laravel-elasticsearch ) of this package**
5
+ > ** The starting point of this package was forked from ` v4.0.1 ` with over 2 years of development **
4
6
5
7
### An OpenSearch implementation of Laravel's Eloquent ORM
6
8
@@ -11,20 +13,23 @@ powerful search and analytics capabilities of OpenSearch.
11
13
$logs = UserLog::where('type', UserLogType::LOGIN)->where('created_at','>=',Carbon::now()->subDays(30))->get();
12
14
```
13
15
14
- ### Read the [ Documentation] ( https://elasticsearch.pdphilip.com/ )
15
-
16
- Note: This package will receive its own version of this documentation. In the meantime, you can reference the Elasticsearch documentation and replace all namespaces ` PDPhilip\Elasticsearch\... ` with ` PDPhilip\OpenSearch\... `
16
+ ### Read the [ Documentation] ( https://opensearch.pdphilip.com/ )
17
17
18
18
---
19
19
20
20
## Installation
21
21
22
- ** Laravel 11.x (main):**
22
+ ** Laravel 10 & 11 (main):**
23
23
24
24
``` bash
25
- composer require pdphilip/opensearch:dev-main
25
+ composer require pdphilip/opensearch
26
26
```
27
27
28
+ | Laravel Version | Command | Maintained |
29
+ | -----------------| -----------------------------------------------| ------------|
30
+ | Laravel 10 & 11 | ` composer require pdphilip/elasticsearch:~2 ` | ✅ |
31
+ | Laravel 8 & 9 | ` composer require pdphilip/elasticsearch:~1 ` | ✅ |
32
+
28
33
## Configuration
29
34
30
35
1 . Set up your ` .env ` with the following OpenSearch settings:
@@ -53,7 +58,7 @@ OS_OPT_PORT_HOST_HEADERS=
53
58
For multiple nodes, pass in as comma-separated:
54
59
55
60
``` ini
56
- ES_HOSTS =" http://opensearch-node1:9200,http://opensearch-node2:9200,http://opensearch-node3:9200"
61
+ OS_HOSTS =" http://opensearch-node1:9200,http://opensearch-node2:9200,http://opensearch-node3:9200"
57
62
```
58
63
59
64
2 . In ` config/database.php ` , add the opensearch connection:
@@ -124,35 +129,32 @@ Now, you're all set to use OpenSearch with Laravel as if it were native to the f
124
129
125
130
## Getting Started
126
131
127
- - [ Installation] ( https://elasticsearch .pdphilip.com/#installation )
128
- - [ Configuration] ( https://elasticsearch .pdphilip.com/#configuration )
132
+ - [ Installation] ( https://opensearch .pdphilip.com/#installation )
133
+ - [ Configuration] ( https://opensearch .pdphilip.com/#configuration )
129
134
130
135
## Eloquent
131
136
132
- - [ The Base Model] ( https://elasticsearch .pdphilip.com/the-base-model )
133
- - [ Querying Models] ( https://elasticsearch .pdphilip.com/querying-models )
134
- - [ Saving Models] ( https://elasticsearch .pdphilip.com/saving-models )
135
- - [ Deleting Models] ( https://elasticsearch .pdphilip.com/deleting-models )
136
- - [ Ordering and Pagination] ( https://elasticsearch .pdphilip.com/ordering-and-pagination )
137
- - [ Distinct and GroupBy] ( https://elasticsearch .pdphilip.com/distinct )
138
- - [ Aggregations] ( https://elasticsearch .pdphilip.com/aggregation )
139
- - [ Chunking] ( https://elasticsearch .pdphilip.com/chunking )
140
- - [ Nested Queries] ( https://elasticsearch .pdphilip.com/nested-queries ) ** New in Version 3 **
141
- - [ Elasticsearch Specific Queries] ( https://elasticsearch .pdphilip.com/es-specific )
142
- - [ Full-Text Search] ( https://elasticsearch .pdphilip.com/full-text-search )
143
- - [ Dynamic Indices] ( https://elasticsearch .pdphilip.com/dynamic-indices )
137
+ - [ The Base Model] ( https://opensearch .pdphilip.com/the-base-model )
138
+ - [ Querying Models] ( https://opensearch .pdphilip.com/querying-models )
139
+ - [ Saving Models] ( https://opensearch .pdphilip.com/saving-models )
140
+ - [ Deleting Models] ( https://opensearch .pdphilip.com/deleting-models )
141
+ - [ Ordering and Pagination] ( https://opensearch .pdphilip.com/ordering-and-pagination )
142
+ - [ Distinct and GroupBy] ( https://opensearch .pdphilip.com/distinct )
143
+ - [ Aggregations] ( https://opensearch .pdphilip.com/aggregation )
144
+ - [ Chunking] ( https://opensearch .pdphilip.com/chunking )
145
+ - [ Nested Queries] ( https://opensearch .pdphilip.com/nested-queries )
146
+ - [ Elasticsearch Specific Queries] ( https://opensearch .pdphilip.com/es-specific )
147
+ - [ Full-Text Search] ( https://opensearch .pdphilip.com/full-text-search )
148
+ - [ Dynamic Indices] ( https://opensearch .pdphilip.com/dynamic-indices )
144
149
145
150
## Relationships
146
151
147
- - [ Elasticsearch to Elasticsearch] ( https://elasticsearch .pdphilip.com/es-es )
148
- - [ Elasticsearch to MySQL] ( https://elasticsearch .pdphilip.com/es-mysql )
152
+ - [ Elasticsearch to Elasticsearch] ( https://opensearch .pdphilip.com/es-es )
153
+ - [ Elasticsearch to MySQL] ( https://opensearch .pdphilip.com/es-mysql )
149
154
150
155
## Schema/Index
151
156
152
- - [ Migrations] ( https://elasticsearch.pdphilip.com/migrations )
153
- - [ Re-indexing Process] ( https://elasticsearch.pdphilip.com/re-indexing )
154
-
155
- ---
156
-
157
+ - [ Migrations] ( https://opensearch.pdphilip.com/migrations )
158
+ - [ Re-indexing Process] ( https://opensearch.pdphilip.com/re-indexing )
157
159
158
160
---
0 commit comments