Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2022-02-03 22:01:41 +00:00
parent 80ca5f8229
commit 3e655dea52
24 changed files with 1228 additions and 1228 deletions

View File

@@ -4,93 +4,6 @@ An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/search/api](ht
Endpoints:
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchForAdocument() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John'",
})
fmt.Println(rsp, err)
}
```
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchOnMultipleFieldsand() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John' AND starsign == 'Leo'",
})
fmt.Println(rsp, err)
}
```
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchOnMultipleFieldsor() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John' OR name == 'Jane'",
})
fmt.Println(rsp, err)
}
```
## Delete
Delete a document given its ID
@@ -212,3 +125,90 @@ Index: "customers",
}
```
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchForAdocument() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John'",
})
fmt.Println(rsp, err)
}
```
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchOnMultipleFieldsand() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John' AND starsign == 'Leo'",
})
fmt.Println(rsp, err)
}
```
## Search
Search for documents in a given in index
[https://m3o.com/search/api#Search](https://m3o.com/search/api#Search)
```go
package example
import(
"fmt"
"os"
"go.m3o.com/search"
)
// Search for documents in a given in index
func SearchOnMultipleFieldsor() {
searchService := search.NewSearchService(os.Getenv("M3O_API_TOKEN"))
rsp, err := searchService.Search(&search.SearchRequest{
Index: "customers",
Query: "name == 'John' OR name == 'Jane'",
})
fmt.Println(rsp, err)
}
```