Closed IAkumaI closed 2 years ago
I found a solution. I must manually add to doc composite _all field. I have no idea where I should found it in docs :)
Am i right?
AddField(bluge.NewCompositeFieldExcluding("_all", []string{"_id"}))
This is correct.
The Bluge documentation does not seem to mention composite fields at all. I searched the Bluge website and found one mention of this in the blog post about site search here:
https://github.com/blugelabs/blugelabs.com/blame/master/content/blog/site-search.md#L81-L89
The example in that blog post is identical to the solution you found.
I would recommend we start by just adding a page to the documentation called "Composite Fields" and giving a short explanation with an example. Possibly also linking to this discussion. If we find there are other places to reference/link this information so that people find it, that can be added later.
Hi. I trying bluge and can not understand why search without field (default to _all) does not work. It's just example from docs:
With SetField("name") it works correctly, but if I remove SetField() or set SetField("_all") - it just does not match anything. Why?