Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm in the process of creating a search function for a website that can boost on certain fieldtypes and tags that we can manage in the backoffice.
I have figured out how to add a boost value to certain fields on index time via hooking up to the DocumentWriting event of the LuceneIndex and I can see that it works when using a normal search via searcher.Search(query) or in Umbraco in the Examine Management tab.
However when using the searcher.CreateQuery() method to create a more extensive search functionality where we can filter based on documentType etc, these boost values seem to be completely ignored.
I noticed that the CreateQuery method doesn't use wildcard search as a default setting and you cannot set it as a default setting either. It has to be added on every field like so:
After you do this however, you cannot use the .Boost() method on this field anymore, chaining is not possible.
I have seen comments about chaining them like so:
But this does not work. It ignores all the previous modifiers and only uses the last one.
Is there another option, method or workaround that I can try to get the expected results?
Thanks in advance!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted