Comments (4)
Hello. Field-Search is already available. Just boosting specific fields will come in the next version which will be 0.7.0, the usage will also explained in the documentation, it is very close to your example :)
from flexsearch.
Also, would be great to have boosting by value of numeric field stored in document. For example, it's useful to sort products by categories with different priority.
from flexsearch.
I have thought about it once again. There are two types of sorting:
- sort by score
- sort by field value
Basically 1. and 2. are already available. For 2. there are also customization available. A way how to customize the sort by score is actually missing. This could be done by manipulate the scoring calculation, e.g.:
- boost score by a custom multiplier (per field, comes in v0.7.0)
- boost score by query elevation (sponsored search)
- adjust score by feedback (to sort by popularity)
- calculate score by a custom function (when indexing)
Your example "sort by a dynamic field value" (e.g. priority) may already be possible with a custom sorting, in addition the custom function at 4. can be used to pre-score per field value (e.g. priority). When 1. and 4. are finally available we need to check if we can find an example, which is not covered by the available features.
from flexsearch.
Please change over to the version >= 0.7.x, thanks a lot. Support for a custom "boost" function will be available soon.
from flexsearch.
Related Issues (20)
- Current NPM package is stale HOT 2
- Cloning of flexsearch objects
- new Document causes `.default is not a constructor` error HOT 1
- Benchmark link is broken HOT 1
- Setting a string as "encode" doesn't work (confusing document?) HOT 1
- How to return context (+ or - few lines) around the hits of given search text
- Enriched document search showing duplicate results
- I have a question about how the results are sorted HOT 2
- Do not force string in Index#add() when custom encoder
- "Document Indexes" link in readme is broken
- Typo in cdn link
- TypeScript doesn't allow omitting id from the document descriptor while the README says it is allowed
- document search option "pluck" is rejected by TypeScript
- Some documents may appear multiple times in the search result
- Error: export 'Document' (imported as 'Document') was not found in 'flexsearch' (possible exports: default) HOT 2
- Add French language pack HOT 1
- return one if exact match? HOT 1
- Having issue indexing entry with symbols/ special characters
- Is there a way to create an offline index in PHP or Python?
- 咨询检索配置(缓存值: "多大的;多少平" 使用:search("是多少平的") 没有返回结果,想要可以返回应该怎么做呢)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexsearch.