Closed manuelportela closed 5 years ago
Simply pass field in a custom search:
console.log(f.search('phrase', {field: 'field1'}));
console.log(f.search('phrase', {field: 'field2'}));
Edit: the uniqueness is actually a bug and will be fixed soon. Thanks for the hint.
Overlapping with your answer: That works indeed, but in my case I want all results that have a match somewhere but I only care for the matching document to appear once in the result. I can manage by filtering afterwards, but this could clash when using a limit search. Why do you return the resulting docs more then once?
This issue refers to: https://github.com/nextapps-de/flexsearch/milestone/7 The merging of results from different fields provides this issue actually and should be fixed with this milestone.
This issue is fixed (v0.5.2).
I expected to get matching documents to be unique within result. What is the angle for repeating these?
Example: