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: 'stallone1946@gmail.com'
})
.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.