
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Ember Data adapter that connects to a Solr server.
The SolrAdapter
currently provides the read methods on DS.Adapter
like find
and findQuery
.
$ ember install:addon ember-solr
This will create a new setting in config/environment.js
. Replace
the default value with your Solr server.
SolrAdapter
$ ember generate solr-adapter application [--enableRealTimeGet] [--url=http://example.com/solr/]
This will make a subclass of SolrAdapter
for you to configure
and register it as the application adapter.
See SolrAdapter for properties and methods you can override.
long
, double
and BigNumber
ember-solr uses a custom JSON parsing library to handle Solr
long
and double
fields without losing precision on values
that exceed Number.MAX_SAFE_INTEGER
(2^53 - 1
).
These values will be automatically detected and represented
as instances of BigNumber
using a string to represent the
complete value.
No support is provided for performing arithmetic computations on BigNumber, such as addition, subtraction or multiplication.
By default, SolrAdapter.dataType
is set to 'jsonp'
to work with
Solr servers that do not have CORS headers enabled. If you want to
use Optimistic Concurrency or use long
or double
fields in
your schema, JSON-P will not be able to handle values that exceed
JavaScript's Number.MAX_SAFE_INTEGER
(2^53 - 1
).
In particular, this limitation means that using Solr's built-in
_version_
field for optimistic concurrency is not possible with
JSON-P.
$ ember generate solr-serializer <name> [--dynamic] [--atomic] [--multiValued]
This will generate a serializer for a given model with some options.
Flag | Description |
---|---|
dynamic | Includes DynamicSerializerMixin |
atomic | Includes AtomicSerializerMixin |
multiValued | Includes AtomicMultiValuedSerializerMixin |
This adapter registers the following types that map to Solr field types
Solr field type | DS.attr type |
---|---|
text | string |
double | BigNumber |
float | number |
int | number |
long | BigNumber |
strings | array of string |
numbers | array of number |
doubles | array of BigNumber |
floats | array of number |
ints | array of number |
longs | array of BigNumber |
booleans | array of boolean |
dates | array of date |
The plural array types are intended for use with Solr fields
that are multiValued="true"
.
config/environment.js
sets the URL of the Solr server.
SolrAdapter
has the following properties:
baseURL
usually injected from config/environment
dataType
(Default: jsonp
) chooses normal json
or jsonp
to side-step cross origin restrictionsdefaultCore
specify a Solr Core to route requests to by defaultdefaultSerializer
(Default: -solr
)enableRealtimeGet
(Default: false
) use Solr's RealTimeGetHandler when applicableSolrAdapter
also has these methods that can be overridden:
coreForType
choose another Solr Core for a given typefilterQueryForType
create an optional filter query to filter documentshandlerForType
select a Solr request handler path and type for an operationuniqueKeyForType
override the canonical id
field with something elseDynamicSerializerMixin
provides a quick way to connect to a Solr server using
Dynamic Fields.
Declare a model such as:
import DS from 'ember-data';
export default DS.Model.extend({
title: DS.attr(),
keywords: DS.attr('strings'),
body: DS.attr('text'),
popularity: DS.attr('float'),
isPublic: DS.attr('boolean')
});
Then generate a serializer for your model:
ember g solr-serializer post --dynamic
The attributes on this model would be mapped, by default, to:
See DynamicSerializerMixin for more on how to customize dynamic field names.
git clone
this repositorynpm install -g ember-cli bower
ember install
ember test
For more information on using ember-cli, visit http://www.ember-cli.com/.
FAQs
Solr adapter for Ember Data
The npm package ember-solr receives a total of 0 weekly downloads. As such, ember-solr popularity was classified as not popular.
We found that ember-solr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.