Closed greggman closed 7 months ago
I noticed the same when searching for names.
"John Doe" matches "John Doe"
But if the name is in reversed order:
"Doe John" matches "Doe Smith"
Which doesn't make too much sense.
I ended up using "minisearch". It's possible I just didn't configure Fuse correctly though.
====[ minisearch ] =========
=> 17.50778137835728 WebGPU Points with size and texture and color
=> 16.794186897155022 Copy of Raw WebGPU article (no color)
=> 15.614913036410263 WebGPU Sprite Multiple - one vertex buffer, update verts, + color
=> 15.614913036410263 WebGPU Points with size and texture and color, rotation, and (mips)
=> 10.455952247922246 WebGPU Vertex Buffer vertices - instanced colors with edge texture
7.046643923518333 CSS Relative Color
6.247157089843079 Check Framebuffer Attachment Color Encoding
6.247157089843079 Floating point color textures.
6.247157089843079 Floating point color textures.
5.937783199077046 Simple CSS to 32bit color conversion
5.937783199077046 Color Points Facing Away vs Forward
5.937783199077046 WebGL 8 color attachments render targets
5.440594521071296 WebGL globe only shows color for first dataset
5.058560490790414 WebGL Sprite Multiple - one vertex buffer, update verts, + color
4.306472176379028 Draw a Texture where every mip color and we select them with TEXTURE_BASE_LEVEL and TEXTURE_MAX_LEVEL
4.27174440631764 WebGPU Cube (webgpu-utils)
4.116773772922422 WebGPU Cube
4.116773772922422 WebGPU: SDF
4.116773772922422 WebGPU: Quad
4.116773772922422 WebGPU: captureStream
4.116773772922422 WebGPU Points
3.8292497486649437 WebGPU fragCoord quad
3.8292497486649437 WebGPU Multiple Canvases
3.8292497486649437 WebGPU padding test
3.8292497486649437 WebGPU Throttling Issue
3.8292497486649437 WebGPU: Destroy Device
3.8292497486649437 WebGPU: Draw Quads
3.8292497486649437 WebGPU endless loop
3.8292497486649437 WebGPU const math
3.8292497486649437 WebGPU-Memory Example
3.8292497486649437 WebGPU canvas import
3.8292497486649437 WebGPU: executeBundles test
3.59274906137481 WebGPU Cube - with copy
3.59274906137481 WebGPU: Simple Compute Shader
3.59274906137481 WebGPU Render with rgba8unorm
3.59274906137481 WebGPU 0 in labels
3.59274906137481 WebGPU Cube - Pulling Vertices
3.59274906137481 WebGPU \0 in shader
3.59274906137481 WebGPU small and simple
3.59274906137481 WebGPU canvas2d drawImage order
3.59274906137481 WebGPU check limit requests
3.59274906137481 WebGPU vs WebGL: FragCoord
3.59274906137481 WebGPU dpdx dpdy normals
3.59274906137481 WebGPU: Mask via Stencil
3.59274906137481 WebGPU: memory - example 2
3.59274906137481 WebGPU: memory - shader module
3.59274906137481 WebGPU: Compute shader basics
3.59274906137481 WebGPU Points with size
3.59274906137481 WebGPU textureLoad with mips
3.59274906137481 WebGPU 2 multisample pipelines
3.59274906137481 WebGPU clip space coordinatees
3.59274906137481 WebGPU Depth Only Render
3.59274906137481 WebGPU: Indexing interleaved f32s
3.59274906137481 WebGPU: cube map test
3.59274906137481 WebGPU Cube w/Timing
3.394796867245139 Copy of Raw WebGPU article
3.394796867245139 WebGPU pow(negative, positive)
3.394796867245139 WebGPU Cube with transparency
3.394796867245139 WebGPU Multiple Views simulating Multiple Canvases
3.394796867245139 WebGPU: Test maxBindingGroups and maxBindingsPerBindGroup
3.394796867245139 WebGPU: Test Depth Store test
3.394796867245139 WebGPU: request features and limits
3.394796867245139 WebGPU: Quad (with F)
3.394796867245139 WebGPU: Triangle in Clip Space
3.394796867245139 WebGPU Multiple Canvases (2k)
3.394796867245139 WebGPU Simple Textured Quads - Text
3.394796867245139 WebGPU Cube w/3d texture
3.394796867245139 WebGPU auto generated GPUBindGroupLayout message
3.226678553574504 WebGPU 2 Cubes (stride 0)
3.226678553574504 WebGPU Cube (pause on resize)
3.226678553574504 WebGPU Multiple Canvases (Intersection Observer)
3.226678553574504 WebGPU hello triangle via uniform array
3.226678553574504 WebGPU Cube - Pulling Vertices (Firefox)
3.226678553574504 WebGPU Cube - Pulling Vertices (indexed)
3.226678553574504 WebGL and WebGPU devtool console messages
3.226678553574504 WebGPU Simple Textured Quad MipFilter - issue
3.226678553574504 WebGPU: memory - shader module (1 shader)
3.226678553574504 WebGPU textureLoad with mips (rgb9e5ufloat)
3.226678553574504 WebGPU endless loop - look at ascii
3.226678553574504 WebGPU: bindGroup buffer size error test
3.226678553574504 WebGPU: Compat with validation - generate mipmap
3.2041276265298784 Test illegal colors
3.082122235813342 WebGPU - Picking - GPU (vs SVG hover)
3.082122235813342 WebGPU Cube (with F + normal)
3.082122235813342 WebGPU Simple Triangle - write to storage buffer
3.082122235813342 WebGPU Render bc1-rgba-unorm to rgba8unorm
3.082122235813342 WebGPU Simple Textured Quad (float16 / rgba16float)
3.082122235813342 WebGPU draw to texture and keep contents
3.082122235813342 WebGPU Cube with atomicAdd in fragment shader
3.082122235813342 WebGPU sample center of 2x2 cube face
3.082122235813342 WebGPU with Canvas 2D on top - sync
3.0062354973722494 Draw in multiple colors
2.956498927506214 Copy of Raw WebGPU article (no indices)
2.956498927506214 WebGPU Test copying the canvas via drawImage
2.956498927506214 WebGPU load an HTMLImageElement (needs Chrome 118)
2.956498927506214 WebGPU: Compat with validation - generate mipmap (validation compatible)
2.8463176637312073 WebGPU: ShaderToy (https://www.shadertoy.com/view/DlBXW1)
2.8463176637312073 WebGPU Cube (with vec4 + f32 vertex buffer)
2.8463176637312073 WebGPU Cube Multiple (with a renderbundle per object)
2.8463176637312073 WebGPU Sprite Multiple - single,double,triple buffered - bindGroup per
2.8463176637312073 Canvas with size 0 in WebGL, WebGPU, and Canvas2D
2.8463176637312073 WebGPU Compute Shader num F16 values 0 to 1
2.8463176637312073 WebGPU: generate mipmap comparison (as cube vs as 2d)
2.8463176637312073 WebGPU: generate mipmap comparison (as cube vs as 2d)
2.8463176637312073 WebGPU: generate mipmap comparison (as cube vs as 2d)
2.8463176637312073 WebGPU: generate mipmap comparison (as cube vs as 2d)
2.748896027414718 WebGPU Texture Upload (uploads 500, 256x256 textures, with mips)
2.748896027414718 WebGPU Multiple Triangles w/split Storage Buffers (explicit bindGroupLayout)
2.748896027414718 WebGPU test storage buffer write from fragment shader using atomic
2.748896027414718 WebGPU Simple Textured Quad Mipmap (use views with mips)
2.748896027414718 WebGPU draw to texture and keep contents (multi-sampled)
2.7308511057662863 Canvas2D colorSpace srgb vs display-p3
2.662138875439085 WebGPU One 2D texture with 8 layers and only "2d" views
2.608508029550573 Canvas2D colorSpace srgb vs display-p3 conversion
2.5843859606010224 WebGPU Sprite Multiple - single,double,triple buffered - one vertex buffer, update verts
2.5789681144601846 solid colors three.js by calling toNonIndexed
2.450812948206141 WebGPU Simple Inter-Stage Variables by fn param - pass vertex_index to fragment shader
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days
Is there an existing issue for this?
Description of the bug
v7.0.0
Given a list of strings, I search for 2 words, fuse results scores where entries with those 2 words are not scored high
The Fuse.js version where this bug is happening.
Other: 7.0.0
Is this a regression?
Which version did this behavior use to work in?
no idea. this is the first time I've used fuse
Steps To Reproduce
Load a bunch of simple records in with name, id Search for 2 words in name in some records
https://jsfiddle.net/greggman/3780hd6w/
Expected behavior
The entries with the 2 words have the highest score
For example if the entries were
And the search was
Then I'd expect entries 1 and 2 to be the highest scored as they contain both words vs 3 and 4 which contain only 1 word each and 5 which contains none of the words I searched for
But that's not what I see
Screenshots
Example output:
Here's are the 5 entries that have both "color" and "webgpu" in them
And here's the results from searching with their score. The 5 entries are marked with
=>
. I'd have expected them to be the top 5 results.Additional context
The linked jsfiddle does a simple filter for entries that have the words "color" and "webgpu" (case insensitive). It finds 5 entries. Those entries are no where near highest scores of the fuse results.
Maybe I'm using it wrong or maybe I don't understand what this library is supposed to do?