Hi guys,
I have a 9.8.11 application which still uses the weighted search as once implemented when it was still a DW8 application.
The customer detected that when searching on a specific term some pages are shown above pages with the term in the title.
I've set the title weight of the titles to the max of 10 in the select option, but the top pages have the term more than 200 times in the content so they are still on top.
The customer doesn't want that, so I thougth it to be a good time to switch to an indexed search on a content index. There I can set weight to whatever value I want.
I created a content repository, content index, content builder, content query.
For the index fields I added
- the contentindexschemaextender
- A summary field with text fields of paragraph items I want to search through, boost 1
- A summery field with page PageManuText and PageItem titles, boost 100
A query with OR expression with equal and containsextended on the summary fields compared to the search parameter value.
Sorted by score descending
The query builder output rates the result with the term in the title higher than with the term in the content.
Thats fine.
But all results with the term in the content are scored the same.
Doesn't matter if it is there once or more than 200 times ...
I want the score to be higher depending on the number of times the term is found.
But can't seem to find a way how.
What am I forgetting here?
I feel I should know this, but I'm stuggling .... and I 'm not too big to ask ...
I need weekend ...
Second question, and related ....
The weighted search provides a short text to present with the result, the title and a bit of content.
What should be the best approach to have that available on query output? Since it can come from all kinds of item fields ...
And not kill the performance too much ...
BR Peter