Function for lifting up results as "sponsored hits" or "best bet"

(from github.com/Anders-Bergqvist)
Hello!
I would like to accomplish a function like when you search for a word say “apple” I could present a page of my choosing with my own text for example “Are you searching for fruit? Welcome to our fruit section!” and have that linked.

I have tried the function for Related content and then I can get a text to appear but I can’t seem to adhere a link to the result?

Then I tried the Key Match function but there the crawler presents as many url:s that I’ve chosen in the GUI but I can’t seem to edit them. I thought that the crawler would present its best matching url:s and then I could reorder and delete amongst them to fine tune the key match for that particular word?
Please advise!

Ps. It would be great to see screenshots of the gui with an actual configuration of all the functions. Ds.

(from github.com/marevol)
Could you give me an example for the key match?
I’m not sure what you want to lift up…

(from github.com/Anders-Bergqvist)
I want to decide for myself wich url I want to present for a certain word. On the Google Search Appliance wich our Fess installation is replacing you can enter a word and a url for match and then a text that should appear on top of the result page (serp).

Is there a similar functionality in FESS?

(from github.com/marevol)
What is a problem about related content and key match?

(from github.com/marevol)

I want to present for a certain word.

You can use NOT query in Query.

(from github.com/Anders-Bergqvist)
For a certain word thats beeing searched for, say “Apple” I would like to present a certain url of my choosing together with my own copy text. I don’t know If there is a problem with related content or Key match or if I’ts just me who don’t get how it works? Has someone else done anything on this topic please share!

(from github.com/burple6)
This is the function of the related content feature. You put in a search term or phrase and then add “content”: usually a div with some links. Since you generate the content, it can point at anything, even content that is not crawled or indexed by fess. This is a great feature, but comes with one caveat: the links you provide in your content do not “teach” the search engine, they are normal links and are not tracked when a user clicks them.

(from github.com/Anders-Bergqvist)
@burple6 Thank you, now I understand how this one works! When I at last have some one that can explain things around the functions. Can you explain how to use the “Key Match” function also? I would appreciate that a lot!

(from github.com/burple6)
You are very welcome. The Key Match feature allows you to boost the score for particular crawled results to a specific query. For example, if you create a key match like this:
Term: upgrade
Query: url:“https://fess.codelibs.org/12.4/install/upgrade.html?highlight=upgrade
Size: 1
Boost: 100

then when someone performs a search for the term upgrade (case insensitive, but otherwise must be an exact match), then the URL https://fess.codelibs.org/12.4/install/upgrade.html?highlight=upgrade will be boosted by 100 in the results.

A few things to note here: for Key Match, the results being boosted must appear in the result set for the query in order to be boosted. This means that if you tried to boost the term “recycle” for the same URL, and that term appears nowhere in the title, content, or URL, the boost will accomplish nothing. Also, the “url:” Query parameter is a Java pattern, so it can match more than a single URL. If matching (and boosting) more than 1 URL, then the size parameter dictates how many matching URLs will be boosted. Additionally, if the Query value has any / characters in it (most URLs do, if boosting by URL) then you will want to enclose the value in double-quotes as in the example, or escape all of the / characters with \/.

Additionally, you can boost by other facets of the result, for instance adding terms and removing terms from the query. For example:
Term: new
Query: new AND upgrade AND NOT archive
Size: 1
Boost: 100
Would result in a search for “new” (again, exact match except for case), where the first match in the result meeting criteria “new AND upgrade AND NOT archive” (also including the term “upgrade” but not the term “archive”) would have its score boosted by 100.

I hope this helps things make sense.

1 Like

(from github.com/Anders-Bergqvist)
It really does! Thanks a lot! How did you figure this out? I think Fess feels like it has a lot to give, the only disadvantage is that it’s not so well documented (to say the least). Write a manual and I’ll buy It for sure! : )