mirror of
https://github.com/typeable/bloodhound.git
synced 2024-09-11 08:25:32 +03:00
Merge pull request #231 from ymyzk/fix-typo
Fix typo: ElasticSearch -> Elasticsearch
This commit is contained in:
commit
80984f2125
14
README.md
14
README.md
@ -22,17 +22,17 @@ Version compatibility
|
|||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
As of version 0.13.0.0, Bloodhound has 2 separate module trees for
|
As of version 0.13.0.0, Bloodhound has 2 separate module trees for
|
||||||
ElasticSearch versions 1 and 5. Import the module that is appropriate
|
Elasticsearch versions 1 and 5. Import the module that is appropriate
|
||||||
for your use case. If you would like to add support for another major
|
for your use case. If you would like to add support for another major
|
||||||
version, open a ticket expressing your intend and follow the pattern
|
version, open a ticket expressing your intend and follow the pattern
|
||||||
used for other versions. We weighed the idea of sharing code between
|
used for other versions. We weighed the idea of sharing code between
|
||||||
versions but it just got too messy, especially considering the
|
versions but it just got too messy, especially considering the
|
||||||
instability of the ElasticSearch API. We switched to a model which
|
instability of the Elasticsearch API. We switched to a model which
|
||||||
would allow the persons responsible for a particular protocol version
|
would allow the persons responsible for a particular protocol version
|
||||||
to maintain that version while avoiding conflict with other versions.
|
to maintain that version while avoiding conflict with other versions.
|
||||||
|
|
||||||
See our [TravisCI](https://travis-ci.org/bitemyapp/bloodhound) for a
|
See our [TravisCI](https://travis-ci.org/bitemyapp/bloodhound) for a
|
||||||
listing of ElasticSearch version we test against.
|
listing of Elasticsearch version we test against.
|
||||||
|
|
||||||
|
|
||||||
Stability
|
Stability
|
||||||
@ -43,15 +43,15 @@ Bloodhound is stable for production use. I will strive to avoid breaking API com
|
|||||||
Testing
|
Testing
|
||||||
---------
|
---------
|
||||||
|
|
||||||
The TravisCI tests are run using [Stack](http://docs.haskellstack.org/en/stable/README.html). You should use Stack instead of `cabal` to build and test Bloodhound to avoid compatibility problems. You will also need to have an ElasticSearch instance running at `localhost:9200` in order to execute some of the tests. See the "Version compatibility" section above for a list of ElasticSearch versions that are officially validated against in TravisCI.
|
The TravisCI tests are run using [Stack](http://docs.haskellstack.org/en/stable/README.html). You should use Stack instead of `cabal` to build and test Bloodhound to avoid compatibility problems. You will also need to have an Elasticsearch instance running at `localhost:9200` in order to execute some of the tests. See the "Version compatibility" section above for a list of Elasticsearch versions that are officially validated against in TravisCI.
|
||||||
|
|
||||||
Steps to run the tests locally:
|
Steps to run the tests locally:
|
||||||
1. Dig through the [past releases] (https://www.elastic.co/downloads/past-releases) section of the ElasticSearch download page and install the desired ElasticSearch versions.
|
1. Dig through the [past releases] (https://www.elastic.co/downloads/past-releases) section of the Elasticsearch download page and install the desired Elasticsearch versions.
|
||||||
2. Install [Stack] (http://docs.haskellstack.org/en/stable/README.html#how-to-install)
|
2. Install [Stack] (http://docs.haskellstack.org/en/stable/README.html#how-to-install)
|
||||||
3. In your local Bloodhound directory, run `stack setup && stack build`
|
3. In your local Bloodhound directory, run `stack setup && stack build`
|
||||||
4. Start the desired version of ElasticSearch at `localhost:9200`, which should be the default.
|
4. Start the desired version of Elasticsearch at `localhost:9200`, which should be the default.
|
||||||
5. Run `stack test` in your local Bloodhound directory.
|
5. Run `stack test` in your local Bloodhound directory.
|
||||||
6. The unit tests will pass if you re-execute `stack test`. If you want to start with a clean slate, stop your ElasticSearch instance, delete the `data/` folder in the ElasticSearch installation, restart ElasticSearch, and re-run `stack test`.
|
6. The unit tests will pass if you re-execute `stack test`. If you want to start with a clean slate, stop your Elasticsearch instance, delete the `data/` folder in the Elasticsearch installation, restart Elasticsearch, and re-run `stack test`.
|
||||||
|
|
||||||
|
|
||||||
Hackage page and Haddock documentation
|
Hackage page and Haddock documentation
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: bloodhound
|
name: bloodhound
|
||||||
version: 0.16.0.0
|
version: 0.16.0.0
|
||||||
synopsis: ElasticSearch client library for Haskell
|
synopsis: Elasticsearch client library for Haskell
|
||||||
description: ElasticSearch made awesome for Haskell hackers
|
description: Elasticsearch made awesome for Haskell hackers
|
||||||
homepage: https://github.com/bitemyapp/bloodhound
|
homepage: https://github.com/bitemyapp/bloodhound
|
||||||
license: BSD3
|
license: BSD3
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Bloodhound Examples
|
# Bloodhound Examples
|
||||||
|
|
||||||
These examples can be built via `stack build`.
|
These examples can be built via `stack build`.
|
||||||
To run them start an ElasticSearch 5.x server at `localhost:9200`
|
To run them start an Elasticsearch 5.x server at `localhost:9200`
|
||||||
|
|
||||||
Run with `stack exec tweet-example`
|
Run with `stack exec tweet-example`
|
||||||
|
@ -281,7 +281,7 @@ updateSnapshotRepo SnapshotRepoUpdateSettings {..} repo =
|
|||||||
|
|
||||||
|
|
||||||
-- | Verify if a snapshot repo is working. __NOTE:__ this API did not
|
-- | Verify if a snapshot repo is working. __NOTE:__ this API did not
|
||||||
-- make it into ElasticSearch until 1.4. If you use an older version,
|
-- make it into Elasticsearch until 1.4. If you use an older version,
|
||||||
-- you will get an error here.
|
-- you will get an error here.
|
||||||
verifySnapshotRepo
|
verifySnapshotRepo
|
||||||
:: ( MonadBH m
|
:: ( MonadBH m
|
||||||
@ -479,7 +479,7 @@ getIndexSettings (IndexName indexName) = do
|
|||||||
-- to True is the main way to release disk space back to the OS being
|
-- to True is the main way to release disk space back to the OS being
|
||||||
-- held by deleted documents.
|
-- held by deleted documents.
|
||||||
--
|
--
|
||||||
-- Note that this API was deprecated in ElasticSearch 2.1 for the
|
-- Note that this API was deprecated in Elasticsearch 2.1 for the
|
||||||
-- almost completely identical forcemerge API. Adding support to that
|
-- almost completely identical forcemerge API. Adding support to that
|
||||||
-- API would be trivial but due to the significant breaking changes,
|
-- API would be trivial but due to the significant breaking changes,
|
||||||
-- this library cannot currently be used with >= 2.0, so that feature was omitted.
|
-- this library cannot currently be used with >= 2.0, so that feature was omitted.
|
||||||
@ -520,7 +520,7 @@ existentialQuery url = do
|
|||||||
-- responses from elasticsearch should fall into these two
|
-- responses from elasticsearch should fall into these two
|
||||||
-- categories. If they don't, a 'EsProtocolException' will be
|
-- categories. If they don't, a 'EsProtocolException' will be
|
||||||
-- thrown. If you encounter this, please report the full body it
|
-- thrown. If you encounter this, please report the full body it
|
||||||
-- reports along with your ElasticSearch verison.
|
-- reports along with your Elasticsearch verison.
|
||||||
parseEsResponse :: (MonadThrow m, FromJSON a) => Reply
|
parseEsResponse :: (MonadThrow m, FromJSON a) => Reply
|
||||||
-> m (Either EsError a)
|
-> m (Either EsError a)
|
||||||
parseEsResponse reply
|
parseEsResponse reply
|
||||||
|
@ -525,7 +525,7 @@ data IndexOptimizationSettings =
|
|||||||
|
|
||||||
|
|
||||||
{-| 'defaultIndexOptimizationSettings' implements the default settings that
|
{-| 'defaultIndexOptimizationSettings' implements the default settings that
|
||||||
ElasticSearch uses for index optimization. 'maxNumSegments' is Nothing,
|
Elasticsearch uses for index optimization. 'maxNumSegments' is Nothing,
|
||||||
'onlyExpungeDeletes' is False, and flushAfterOptimize is True.
|
'onlyExpungeDeletes' is False, and flushAfterOptimize is True.
|
||||||
-}
|
-}
|
||||||
defaultIndexOptimizationSettings :: IndexOptimizationSettings
|
defaultIndexOptimizationSettings :: IndexOptimizationSettings
|
||||||
@ -736,11 +736,11 @@ data EsError = EsError { errorStatus :: Int
|
|||||||
, errorMessage :: Text } deriving (Eq, Read, Show, Generic, Typeable)
|
, errorMessage :: Text } deriving (Eq, Read, Show, Generic, Typeable)
|
||||||
|
|
||||||
{-| 'EsProtocolException' will be thrown if Bloodhound cannot parse a response
|
{-| 'EsProtocolException' will be thrown if Bloodhound cannot parse a response
|
||||||
returned by the ElasticSearch server. If you encounter this error, please
|
returned by the Elasticsearch server. If you encounter this error, please
|
||||||
verify that your domain data types and FromJSON instances are working properly
|
verify that your domain data types and FromJSON instances are working properly
|
||||||
(for example, the 'a' of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
|
(for example, the 'a' of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
|
||||||
sure that your mappings are correct, then this error may be an indication of an
|
sure that your mappings are correct, then this error may be an indication of an
|
||||||
incompatibility between Bloodhound and ElasticSearch. Please open a bug report
|
incompatibility between Bloodhound and Elasticsearch. Please open a bug report
|
||||||
and be sure to include the exception body.
|
and be sure to include the exception body.
|
||||||
-}
|
-}
|
||||||
data EsProtocolException = EsProtocolException { esProtoExBody :: L.ByteString }
|
data EsProtocolException = EsProtocolException { esProtoExBody :: L.ByteString }
|
||||||
@ -3980,7 +3980,7 @@ newtype FullNodeId = FullNodeId { fullNodeId :: Text }
|
|||||||
|
|
||||||
|
|
||||||
-- | A human-readable node name that is supplied by the user in the
|
-- | A human-readable node name that is supplied by the user in the
|
||||||
-- node config or automatically generated by ElasticSearch.
|
-- node config or automatically generated by Elasticsearch.
|
||||||
newtype NodeName = NodeName { nodeName :: Text }
|
newtype NodeName = NodeName { nodeName :: Text }
|
||||||
deriving (Eq, Ord, Generic, Show, Typeable, FromJSON)
|
deriving (Eq, Ord, Generic, Show, Typeable, FromJSON)
|
||||||
|
|
||||||
@ -4266,7 +4266,7 @@ data NodeIndicesStats = NodeIndicesStats {
|
|||||||
, nodeIndicesStatsDocsCount :: Int
|
, nodeIndicesStatsDocsCount :: Int
|
||||||
} deriving (Eq, Show, Generic, Typeable)
|
} deriving (Eq, Show, Generic, Typeable)
|
||||||
|
|
||||||
-- | A quirky address format used throughout ElasticSearch. An example
|
-- | A quirky address format used throughout Elasticsearch. An example
|
||||||
-- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a
|
-- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a
|
||||||
-- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.
|
-- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.
|
||||||
newtype EsAddress = EsAddress { esAddress :: Text }
|
newtype EsAddress = EsAddress { esAddress :: Text }
|
||||||
@ -4459,7 +4459,7 @@ defaultSnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings True
|
|||||||
|
|
||||||
|
|
||||||
-- | A filesystem-based snapshot repo that ships with
|
-- | A filesystem-based snapshot repo that ships with
|
||||||
-- ElasticSearch. This is an instance of 'SnapshotRepo' so it can be
|
-- Elasticsearch. This is an instance of 'SnapshotRepo' so it can be
|
||||||
-- used with 'updateSnapshotRepo'
|
-- used with 'updateSnapshotRepo'
|
||||||
data FsSnapshotRepo = FsSnapshotRepo {
|
data FsSnapshotRepo = FsSnapshotRepo {
|
||||||
fsrName :: SnapshotRepoName
|
fsrName :: SnapshotRepoName
|
||||||
@ -4704,7 +4704,7 @@ newtype RestoreRenamePattern = RestoreRenamePattern { rrPattern :: Text }
|
|||||||
|
|
||||||
-- | A single token in a index renaming scheme for a restore. These
|
-- | A single token in a index renaming scheme for a restore. These
|
||||||
-- are concatenated into a string before being sent to
|
-- are concatenated into a string before being sent to
|
||||||
-- ElasticSearch. Check out these Java
|
-- Elasticsearch. Check out these Java
|
||||||
-- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.
|
-- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.
|
||||||
data RestoreRenameToken = RRTLit Text
|
data RestoreRenameToken = RRTLit Text
|
||||||
-- ^ Just a literal string of characters
|
-- ^ Just a literal string of characters
|
||||||
|
@ -345,7 +345,7 @@ updateSnapshotRepo SnapshotRepoUpdateSettings {..} repo =
|
|||||||
|
|
||||||
|
|
||||||
-- | Verify if a snapshot repo is working. __NOTE:__ this API did not
|
-- | Verify if a snapshot repo is working. __NOTE:__ this API did not
|
||||||
-- make it into ElasticSearch until 1.4. If you use an older version,
|
-- make it into Elasticsearch until 1.4. If you use an older version,
|
||||||
-- you will get an error here.
|
-- you will get an error here.
|
||||||
verifySnapshotRepo
|
verifySnapshotRepo
|
||||||
:: ( MonadBH m
|
:: ( MonadBH m
|
||||||
@ -628,7 +628,7 @@ existentialQuery url = do
|
|||||||
-- responses from elasticsearch should fall into these two
|
-- responses from elasticsearch should fall into these two
|
||||||
-- categories. If they don't, a 'EsProtocolException' will be
|
-- categories. If they don't, a 'EsProtocolException' will be
|
||||||
-- thrown. If you encounter this, please report the full body it
|
-- thrown. If you encounter this, please report the full body it
|
||||||
-- reports along with your ElasticSearch verison.
|
-- reports along with your Elasticsearch verison.
|
||||||
parseEsResponse :: (MonadThrow m, FromJSON a) => Reply
|
parseEsResponse :: (MonadThrow m, FromJSON a) => Reply
|
||||||
-> m (Either EsError a)
|
-> m (Either EsError a)
|
||||||
parseEsResponse reply
|
parseEsResponse reply
|
||||||
@ -810,7 +810,7 @@ versionCtlParams cfg =
|
|||||||
-- Elasticsearch. The document itself is simply something we can
|
-- Elasticsearch. The document itself is simply something we can
|
||||||
-- convert into a JSON 'Value'. The 'DocId' will function as the
|
-- convert into a JSON 'Value'. The 'DocId' will function as the
|
||||||
-- primary key for the document. You are encouraged to generate
|
-- primary key for the document. You are encouraged to generate
|
||||||
-- your own id's and not rely on ElasticSearch's automatic id
|
-- your own id's and not rely on Elasticsearch's automatic id
|
||||||
-- generation. Read more about it here:
|
-- generation. Read more about it here:
|
||||||
-- https://github.com/bitemyapp/bloodhound/issues/107
|
-- https://github.com/bitemyapp/bloodhound/issues/107
|
||||||
--
|
--
|
||||||
|
@ -539,7 +539,7 @@ data ForceMergeIndexSettings =
|
|||||||
|
|
||||||
|
|
||||||
{-| 'defaultForceMergeIndexSettings' implements the default settings that
|
{-| 'defaultForceMergeIndexSettings' implements the default settings that
|
||||||
ElasticSearch uses for index optimization. 'maxNumSegments' is Nothing,
|
Elasticsearch uses for index optimization. 'maxNumSegments' is Nothing,
|
||||||
'onlyExpungeDeletes' is False, and flushAfterOptimize is True.
|
'onlyExpungeDeletes' is False, and flushAfterOptimize is True.
|
||||||
-}
|
-}
|
||||||
defaultForceMergeIndexSettings :: ForceMergeIndexSettings
|
defaultForceMergeIndexSettings :: ForceMergeIndexSettings
|
||||||
@ -700,10 +700,10 @@ instance FromJSON TokenFilterDefinition where
|
|||||||
_ -> fail ("unrecognized token filter type: " ++ T.unpack t)
|
_ -> fail ("unrecognized token filter type: " ++ T.unpack t)
|
||||||
|
|
||||||
-- | The set of languages that can be passed to various analyzers,
|
-- | The set of languages that can be passed to various analyzers,
|
||||||
-- filters, etc. in ElasticSearch. Most data types in this module
|
-- filters, etc. in Elasticsearch. Most data types in this module
|
||||||
-- that have a 'Language' field are actually only actually to
|
-- that have a 'Language' field are actually only actually to
|
||||||
-- handle a subset of these languages. Consult the official
|
-- handle a subset of these languages. Consult the official
|
||||||
-- ElasticSearch documentation to see what is actually supported.
|
-- Elasticsearch documentation to see what is actually supported.
|
||||||
data Language
|
data Language
|
||||||
= Arabic
|
= Arabic
|
||||||
| Armenian
|
| Armenian
|
||||||
@ -750,7 +750,7 @@ instance ToJSON Language where
|
|||||||
|
|
||||||
instance FromJSON Language where
|
instance FromJSON Language where
|
||||||
parseJSON = withText "Language" $ \t -> case languageFromText t of
|
parseJSON = withText "Language" $ \t -> case languageFromText t of
|
||||||
Nothing -> fail "not a supported ElasticSearch language"
|
Nothing -> fail "not a supported Elasticsearch language"
|
||||||
Just lang -> return lang
|
Just lang -> return lang
|
||||||
|
|
||||||
languageToText :: Language -> Text
|
languageToText :: Language -> Text
|
||||||
@ -1066,11 +1066,11 @@ data EsError = EsError { errorStatus :: Int
|
|||||||
, errorMessage :: Text } deriving (Eq, Read, Show, Generic, Typeable)
|
, errorMessage :: Text } deriving (Eq, Read, Show, Generic, Typeable)
|
||||||
|
|
||||||
{-| 'EsProtocolException' will be thrown if Bloodhound cannot parse a response
|
{-| 'EsProtocolException' will be thrown if Bloodhound cannot parse a response
|
||||||
returned by the ElasticSearch server. If you encounter this error, please
|
returned by the Elasticsearch server. If you encounter this error, please
|
||||||
verify that your domain data types and FromJSON instances are working properly
|
verify that your domain data types and FromJSON instances are working properly
|
||||||
(for example, the 'a' of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
|
(for example, the 'a' of '[Hit a]' in 'SearchResult.searchHits.hits'). If you're
|
||||||
sure that your mappings are correct, then this error may be an indication of an
|
sure that your mappings are correct, then this error may be an indication of an
|
||||||
incompatibility between Bloodhound and ElasticSearch. Please open a bug report
|
incompatibility between Bloodhound and Elasticsearch. Please open a bug report
|
||||||
and be sure to include the exception body.
|
and be sure to include the exception body.
|
||||||
-}
|
-}
|
||||||
data EsProtocolException = EsProtocolException { esProtoExBody :: L.ByteString }
|
data EsProtocolException = EsProtocolException { esProtoExBody :: L.ByteString }
|
||||||
@ -4131,7 +4131,7 @@ newtype FullNodeId = FullNodeId { fullNodeId :: Text }
|
|||||||
|
|
||||||
|
|
||||||
-- | A human-readable node name that is supplied by the user in the
|
-- | A human-readable node name that is supplied by the user in the
|
||||||
-- node config or automatically generated by ElasticSearch.
|
-- node config or automatically generated by Elasticsearch.
|
||||||
newtype NodeName = NodeName { nodeName :: Text }
|
newtype NodeName = NodeName { nodeName :: Text }
|
||||||
deriving (Eq, Ord, Generic, Show, Typeable, FromJSON)
|
deriving (Eq, Ord, Generic, Show, Typeable, FromJSON)
|
||||||
|
|
||||||
@ -4406,7 +4406,7 @@ data NodeIndicesStats = NodeIndicesStats {
|
|||||||
, nodeIndicesStatsDocsCount :: Int
|
, nodeIndicesStatsDocsCount :: Int
|
||||||
} deriving (Eq, Show, Generic, Typeable)
|
} deriving (Eq, Show, Generic, Typeable)
|
||||||
|
|
||||||
-- | A quirky address format used throughout ElasticSearch. An example
|
-- | A quirky address format used throughout Elasticsearch. An example
|
||||||
-- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a
|
-- would be inet[/1.1.1.1:9200]. inet may be a placeholder for a
|
||||||
-- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.
|
-- <https://en.wikipedia.org/wiki/Fully_qualified_domain_name FQDN>.
|
||||||
newtype EsAddress = EsAddress { esAddress :: Text }
|
newtype EsAddress = EsAddress { esAddress :: Text }
|
||||||
@ -4600,7 +4600,7 @@ defaultSnapshotRepoUpdateSettings = SnapshotRepoUpdateSettings True
|
|||||||
|
|
||||||
|
|
||||||
-- | A filesystem-based snapshot repo that ships with
|
-- | A filesystem-based snapshot repo that ships with
|
||||||
-- ElasticSearch. This is an instance of 'SnapshotRepo' so it can be
|
-- Elasticsearch. This is an instance of 'SnapshotRepo' so it can be
|
||||||
-- used with 'updateSnapshotRepo'
|
-- used with 'updateSnapshotRepo'
|
||||||
data FsSnapshotRepo = FsSnapshotRepo {
|
data FsSnapshotRepo = FsSnapshotRepo {
|
||||||
fsrName :: SnapshotRepoName
|
fsrName :: SnapshotRepoName
|
||||||
@ -4845,7 +4845,7 @@ newtype RestoreRenamePattern = RestoreRenamePattern { rrPattern :: Text }
|
|||||||
|
|
||||||
-- | A single token in a index renaming scheme for a restore. These
|
-- | A single token in a index renaming scheme for a restore. These
|
||||||
-- are concatenated into a string before being sent to
|
-- are concatenated into a string before being sent to
|
||||||
-- ElasticSearch. Check out these Java
|
-- Elasticsearch. Check out these Java
|
||||||
-- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.
|
-- <https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html docs> to find out more if you're into that sort of thing.
|
||||||
data RestoreRenameToken = RRTLit Text
|
data RestoreRenameToken = RRTLit Text
|
||||||
-- ^ Just a literal string of characters
|
-- ^ Just a literal string of characters
|
||||||
|
Loading…
Reference in New Issue
Block a user