![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
contexture-elasticsearch
Advanced tools
Elasticsearch Provider for Contexture
This provider takes a config object as a parameter, and expects a getClient
method to be provided, which should be an instantiated elasticsearch client.
This provider takes a config object as a parameter:
Option | Type | Description | Required |
---|---|---|---|
getClient | function | Returns an instantiated elasticsearch client | x |
request | object | Merged in the json body of every request to elasticsearch (e.g. to add custom headers) | |
types | object | Contexture node types, like all other providers |
Schemas with with an elasticsearch provider can specify any or all of the following properties:
Option | Type | Description | Required |
---|---|---|---|
index | string | Which ES index to use when querying | x |
type | string | Which ES type to use when querying | |
summaryView | function | Used by results to return a summary view instead of the whole document, (e.g. for indexes with many fields). Defaults to returning the hit property. | |
highlight | object | Used by results to determine what fields to highlight, and whether or not they are inline (copied over inline on to the source) or additional (in a list of additional fields that matched) |
module.exports = {
elasticsearch: {
index: 'SomeIndex',
type: 'SomeType'
}
}
let _ = require('lodash')
let Contexture = require('contexture')
let provider = require('contexture-elasticsearch')
let types = require('contexture-elasticsearch/types')
let schemas = require('./path/to/schemas')
let elasticsearch = require('elasticsearch')
let AgentKeepAlive = require('agentkeepalive'),
let process = Contexture({
schemas,
providers: {
elasticsearch: provider({
getClient: _.memoize(() =>
elasticsearch.Client({
// This is an example config, see the elasticsearch js docs for more
minSockets: 1,
maxSockets: 20,
keepAlive: true,
createNodeAgent: (connection, config) =>
new AgentKeepAlive(connection.makeAgentConfig(config))
})
),
request: {
headers: {
'custom-header-app-name': 'my-app-sent-this'
}
},
types: types({
geo: {
geocodeLocation: query =>
googleplaces.textSearch({
query
})
}
})
})
}
})
bool
cardinality
date
dateHistogram
esTwoLevelAggregation
exists
facet
geo
groupedMetric
matchCardinality
matchStats
nLevelAggregation
nonzeroClusters
number
percentileRanks
percentiles
percentilesRange
query
rangeStats
results
smartIntervalHistogram
smartPercentileRanks
statistical
terms
termsDelta
termsStatsHits
terms_stats
text
twoLevelMatch
FAQs
ElasticSearch Provider for Contexture
The npm package contexture-elasticsearch receives a total of 118 weekly downloads. As such, contexture-elasticsearch popularity was classified as not popular.
We found that contexture-elasticsearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.