I am hoping to use the Solr QueryElevationComponent for best bets on my site search. Hooking it up was easy enough, the biggest issue I have is _uniqueid
field which is used by the component to identify the document (because it's defined as the uniqueKey in the schema). The _uniqueid
field by default contains the index name and the version number, which makes using the component quite unmanageable.
eg.
<query text="boo">
<doc id="sitecore://master/{0a5cce11-62fa-40da-ad28-6ec05e236b0b}?lang=en&ver=18&ndx=sitecore_master_index" />
</query>
Has anyone got any ideas on, how I can get this to work? I have thought of a few options, but have no idea on the repercussions or if they are even possible:
- Rewrite the
_uniqueid
to something more usable and static between versions - Use a different field as the
uniquekey
(e.g._group
) - Store only the latest version of the Sitecore item in Solr, so I can use the GUID as an identifier.
- List the next few document versions (18,19,20 etc) in the xml file in current format to handle version updates to the Sitecore item