@secretteam/nestjs-solrcloud
v1.0.17
Published
Solrcloud client for Nestjs
Downloads
5
Readme
The purpose of creating this package was the reason for its lack of space and support. The package will be further improved and refined over time. Any constructive criticism and suggestions for improvement are welcome. We are committed to always maintaining the latest features of solr and providing additional features to help develop any application that uses it for large scale applications.
Installation
$ yarn add @secretteam/nestjs-solrcloud
Usage
Register SolrModule
:
import { SolrModule } from '@secretteam/nestjs-solrcloud';
@Module({
imports: [
SolrModule.register({
host: 'localhost',
port: '8983',
secure: false,
core: 'mycore',
}),
],
})
export class AppModule {}
Inject SolrService
:
import { SolrService } from '@secretteam/nestjs-solrcloud';
@Injectable()
export class SearchService {
constructor(private readonly solrService: SolrService) {}
}
Examples
Build a search query:
const query = this.solrService.query('your_collection');
query
.q({
email: '[email protected]'
})
.filter(['email'])
.fields(['firstName', 'lastName', 'email'])
.offset(0)
.limit(10);
Search by query:
this.solrService.search(query);
Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.