Lower level query interface
See original GitHub issueA more advanced query interface is something that lunr definitely needs. I’m not entirely sure what the interface would look like for this, perhaps a different method on the index and a query object itself:
idx.query(function () {
this.all('foo bar*') // these are AND query terms
this.some('*baz') // these are OR query terms
this.limit(10) // maximum number of results to return
this.threshold(0.7) // minimum score for returned documents
this.facet('herp', ['derp', 'burp']) // facets and values
})
This is just a very rough idea, but I think it is the right direction. It hopefully exposes a more powerful interface to the search. The idx.search
method would still exist as a quick way to perform searches, but it would probably be built onto of this query method.
Any input or feedback is much appreciated.
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Low-level interfaces - Amazon DynamoDB
Every language-specific AWS SDK provides a low-level interface for Amazon DynamoDB, with methods that closely resemble low-level DynamoDB API requests.
Read more >Query Interface - Sequelize
The methods from the query interface are therefore lower-level methods; you should use them only if you do not find another way to...
Read more >Fold DynamoDB low level interface query result into its ...
Recently i had to switch from using high level AWS DynamoDB python boto3 API to the low level one so i could talk...
Read more >Interfaces in DBMS - GeeksforGeeks
A database management system (DBMS) interface is a user interface that allows for the ability to input queries to a database without using...
Read more >Query Processing Architecture Guide - SQL Server
The Query Optimizer may choose the view when it contains columns that aren't referenced by the query, as long as the view offers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This seems great! Would love to have facets!
It turned out differently the described in this issue, but the latest version of Lunr does provide more control over performing queries.