Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hydrooj/elastic-search

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hydrooj/elastic-search - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

12

index.ts

@@ -30,3 +30,3 @@ import { Client } from '@elastic/elasticsearch';

simple_query_string: {
query: q,
query: q.replace(/([a-z0-9]{2,})/gi, (i) => `${i}~5`),
fields: ['tag^5', 'pid^4', 'title^3', 'content'],

@@ -42,6 +42,14 @@ },

});
let hits = res.hits.hits.map((i) => i._id);
if (!opts.skip) {
const pdoc = await ProblemModel.get(domainId, +q || q, ProblemModel.PROJECTION_LIST);
if (pdoc) {
hits = hits.filter((i) => i !== `${pdoc.domainId}/${pdoc.docId}`);
hits.unshift(`${pdoc.domainId}/${pdoc.docId}`);
}
}
return {
countRelation: typeof res.hits.total === 'number' ? 'eq' : res.hits.total.relation,
total: typeof res.hits.total === 'number' ? res.hits.total : res.hits.total.value,
hits: res.hits.hits.map((i) => i._id),
hits,
};

@@ -48,0 +56,0 @@ };

4

package.json
{
"name": "@hydrooj/elastic-search",
"version": "1.1.3",
"version": "1.1.4",
"main": "index.ts",

@@ -9,4 +9,4 @@ "repository": "https://github.com/hydro-dev/Hydro",

"dependencies": {
"@elastic/elasticsearch": "^8.12.2"
"@elastic/elasticsearch": "^8.13.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc