Hello, I have installed the package and slowly building it up.
I am so close to getting it to work but I cannot get the Summary to display the content I require yet I can see it in the search in the backend.
var searchTerm = new Search(Request["query"])
.EnableHighlighting()
.SetPageLength(10)
.AddSummaryProperty("pageContent")
.SetSummaryLength(400);
Is the code I am using and what I would expect to see is....
Twice a year we send a newsletter to all of our contributing and pensioner members of the Scheme.The newsletters cover various general topics such as health, finance and lifestyle as well as an update by a state benefits consultant who gives very useful information on changes to benefits such as the State Pension.We also use the newsletters to keep you informed about changes to the Local Government Pension Scheme. Outlook This is sent to our contributing members AtEase This is sent to members in receipt of their pension
However what the page is displaying
The newsletters cover various general topics such as health, finance and lifestyle as well as an update by a state benefits consultant who gives very useful information on changes to benefits such as the State Pension.We also use the newsletters to keep you informed about changes to the Local Government Pension Scheme.
The code I am using to render the summary is
@result.Summary
I am confused and struggling to move on from here.
What's in your pageContent column? The summary is summarized around your search terms, so the content of the summary depends on what you are searching for.
Twice a year we send a newsletter to all of our contributing and pensioner members of the Scheme.The newsletters cover various general topics such as health, finance and lifestyle as well as an update by a state benefits consultant who gives very useful information on changes to benefits such as the State Pension.We also use the newsletters to keep you informed about changes to the Local Government Pension Scheme. Outlook This is sent to our contributing members AtEase This is sent to members in receipt of their pension
So you are saying because Newsletter does not appear in the first paragraph it removes it?
Full Text Search Package
Hello, I have installed the package and slowly building it up.
I am so close to getting it to work but I cannot get the Summary to display the content I require yet I can see it in the search in the backend.
Is the code I am using and what I would expect to see is....
However what the page is displaying
The code I am using to render the summary is
I am confused and struggling to move on from here.
Any advice would be appreciated.
Thanks
What's in your pageContent column? The summary is summarized around your search terms, so the content of the summary depends on what you are searching for.
I am searching for "Newsletter".
This is what is in the pageContent.
Twice a year we send a newsletter to all of our contributing and pensioner members of the Scheme.The newsletters cover various general topics such as health, finance and lifestyle as well as an update by a state benefits consultant who gives very useful information on changes to benefits such as the State Pension.We also use the newsletters to keep you informed about changes to the Local Government Pension Scheme. Outlook This is sent to our contributing members AtEase This is sent to members in receipt of their pension
So you are saying because Newsletter does not appear in the first paragraph it removes it?
Except it does appear in the first paragraph :)
You can see what it does here: https://github.com/skttl/umbraco-fulltextsearch8/blob/v9/dev/src/Our.Umbraco.FullTextSearch/Helpers/Highlighter.cs (depending on which version you are on)
Note, you can also just get the IPublishedContent of the found node by using @result.Content, from there you can get whatever value you need :)
Yes I had that working previously but found the highlight element does not work via this method.
Hi Søren,
Still struggling but I do have a second question.
I run two websites from the CMS with different domains. How can i separate the sites?
Thanks
You can specify a root node in your Search object
Hi Søren,
Perfect thanks, think I have also sorted my first issue as well :)
This is a fantastic tool.
is working on a reply...