Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
elasticitems
Advanced tools
Readme
Elasticsearch 7.x client for JS with faceted search, custom features and simple interface
npm install elasticitems
const elasticitems = require('elasticitems')(es_config, search_config);
elasticitems.search()
.then(result => {
console.log(result);
})
es_config
The first es_config
is elasticsearch configuration object and contains values like host
, index
or type
.
search_config
Responsible for defining global configuration.
aggregations
filters configuration i.e. for tags
, actors
, colors
, etc. Responsible for generating facets.
sortings
you can configure different sortings like tags_asc
, tags_desc
with options and later use it with one key.
options
per_page
amount of items per page.
page
page number - used for pagination.
query
used for full text search.
operator
search operator and
and or
(default). It works with query
parameter
sort
used for sorting. one of sortings
key
filters
filtering items based on specific aggregations i.e. {tags: ['drama' , 'historical']}
query_string
i.e. "brand:Audi OR brand:Mercedes"
facets_names
make faceted search only for specific fields i.e. ['tags', 'genres']
fields
search only in specifc fields i.e. ['name', 'description']. Missing parameter means search in all fields
ids
search by ids i.e. ['1', '2', '3']
exclude_ids
exclude ids from search i.e. ['1', '2', '3']
Show similar items based on collaborative filtering
options
fields
i.e ['tags'].It returns full list of filters for specific aggregation
options
name
aggregation name
per_page
filters per page
size
how much load into memory (for pagination)
page
page number
sort
responsible for sorting mechanism. It can be _count
or _term
order
responsible for an order. It can be asc
or desc
filters
filter this aggregation through another aggregations (facets)
aggregation_query
used for quering filters. It's not full text search
query
search through items
query_string
search through items by query string i.e. (category:Garden and color:red)
Returns found record otherwise throw an error
Returns record based on key and value
Add a new object into index. Provide your own id
if you don't want it auto-generated
Updates object in index
Delete object from index
keyword
type because this type is not tokenized. keyword
type is great for faceted fieldsnpm test
FAQs
Faceted search client on top of Elasticsearch 7.x
The npm package elasticitems receives a total of 13 weekly downloads. As such, elasticitems popularity was classified as not popular.
We found that elasticitems 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.