views:

635

answers:

4

I'm using the code listed here:

http://msdn.microsoft.com/en-us/library/ms553069.aspx

With an additional line added as a call to .update() after the property is set in order to save the changes, but even with a weight of 10,000 the search results for my property are still at the bottom, particularly below title. Is there some other things that need to be done in order to get the weighting to propogate?

I've also tried setting the title, author, and filename to 0, setting the property (keywords) to 9999, and setting length normalization of the property to 0. The results shift a bit, but searches with keywords that match the property still do not match.

All tests were done with a full crawl afterwards, reset IIS, and recycle the shared services app pool.

I can give you any extra information you might request.

Thanks, Stefan

UPDATE (6-19-09): Added a bounty of 500 to this. Very little information about this feature available online, apparently a good answer would a huge service to the internet community. It'd probably save me a week too :)

UPDATE 2 (6-19-09): The schema is essentially this: OOB sharepoint document content type with added text field "Keywords". Managed property attached to ows_keywords(Text).

UPDATE 3 (6-19-09): Sharepoint Search Bench from Codeplex has helped the search a lot.

UPDATE 4 (6-19-09): I've arrived at a solution that involves creating many (5 right now) more managed properties with the same crawled property. Each weight is set to something unusual (like 9999). These do enough to buoy the keyword results to the top. Less than ideal though. Still looking for a solution.

The solution in Update 4 is what I ended up with. As Lars commented, the search is not very flexible and despite offering tweaks to the property weightings, the effect is not always what you would expect.

A: 

Would I be correct in assuming the .update() call is being done at the end of main()? If not, try that, if so then make sure the program is running. I would also assume that the strPropertyName is the one you want. Other than that, I can't really help you.

indyK1ng
Updated the summary. Thanks for the attempt.
Stefan Mai
A: 

Chaging the weighth of a property should not need a recrawl, just a reset of the search service.

Found this on the internet:

In addition to setting the weight of the Managed Property, the Crawled Property that is mapped to the Managed Property must also have the “Include values for this property in the search index” check box set on.

Edit: Found it here: Larry Kuhn's blog

Colin
A: 

Have you tried using only weights in the 0 to 1 range? For example set all the other property weights to 0.2 and set keywords to 0.8. I had a little trouble with Lucene along these lines, and it was magnitude related.

Also if it's never adding hits in that property field to the results (try adding an xyzzy keyword or something and search for it) then it's probably not weight related at all, but rather related to whether the keywords are considered for your search.

dlamblin
SharePoint allows weights above 1. Out-of-the-box - the Author, Filename, and Title properties have 8.215, 29.43, and 75.855 respectively.
Alex Angas
So does Lucene, but when testing my searches with LukeAll, I found that weights in the 1000 range had less effect than weights in the 100 range. And finally when putting all the weights between 0 and 1, I got more consistent results. I can't really explain why, I was just fiddling with settings.
dlamblin
A: 

The property only positively affects the ranking score when you search for keywords present in the property. For any other query the weight has no effect whatsoever! E.g. when searching for the keywords "SharePoint Search", the title property weight ensures that the ranking score is boosted for documents having these keywords in the title. But documents without any of these keywords in the title are not boosted by the title weight. This applies to all managed properties of type text.

Lars Fastrup
This is true, but my problem is being able to make specific properties decisive when a match is found. I realize the weighting doesn't have an effect when no match is found within the property. That doesn't make any sense.
Stefan Mai
Ok, so if I understand it right you basically want your property to be the only one influencing the ranking score?
Lars Fastrup
No. I just want it to be decisive. Anything with a "keywords" property value that contains the search keyword goes to the top. Everything else is ordered normally.
Stefan Mai
Hmm, I am afraid your approach increasing the weight on your property and lowering it on others is the only way to influence ranking here. The SharePoint Search engine is unfortunately not very flexible when it comes to relevance tuning. That is one of the reasons large Enterprise Customers turn to FAST Search, which is more flexible but of course also more expensive.
Lars Fastrup
Not exactly what I was looking for, but I'm finished. I appreciate your persistence. Welcome to 1900.
Stefan Mai
Thanks Stefan :-)
Lars Fastrup