Fuse: Match all tokens should look in different keys as well.

Created on 10 May 2018  路  10Comments  路  Source: krisk/Fuse

From what I understand using tokenize with match all tokens currently forces a match of all tokens on the same key. Would it be possible to force a match of all tokens across any keys of a single match?

e.g.

     {
        title: "Old Man's War",
        author: {
          firstName: "John",
          lastName: "Scalzi"
        }
     }

searching for Old War will match this record, but Old War John will not.

This would be useful in searches where you want two or more attributes of a record to match.
i.e.

{
    jobtitle: 'Lawyer',
    country: 'France'
},
{
    jobtitle: 'Developer',
    country: 'France'
}

There should be a way for a search to return only the first record when search for "lawyer france"

Stale feature help wanted

Most helpful comment

Interesting. Need think on this some more 馃槄.

All 10 comments

Interesting. Need think on this some more 馃槄.

This would be awesome! =)

Opens a lot of new possibilities!!

I've hit the same problem and am currently working around this limitation by using my own getFn which simply bangs all fields together into a single string ... this requires another hack, where I allow multiple fields to be specified in a single key, separated by ",". Yes, an ugly hack, but gets the job done.

Why do you think it's an ugly hack? That's something that could potentially become a feature.

One does not preclude the other... ;)

Show us the code!

One downside I see is that reporting hit ranges will not work, because these relate to the virtual combined item, not the real key items.

Could really use this feature for my current project! Would love to see it implemented.

This would be really helpful

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

imanjra picture imanjra  路  3Comments

washtenawIdtreble picture washtenawIdtreble  路  4Comments

cathy810218 picture cathy810218  路  4Comments

ergcode picture ergcode  路  3Comments

Olian04 picture Olian04  路  4Comments