2

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&amp;ver=18&amp;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
0

When you need the query-elevation component, I would always do that on custom indexes - where only the lastest version is relevant - and therefore the key can be version-static. I would do this by adding it to a different core and changing the uniqueKey field to something better than what Sitecore generates ootb.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.