Thursday, March 17, 2016

Oracle Endeca - Record Boost and Bury

Record boost and bury is a mechanism by which the ranking of certain specific records is made much  higher or lower than other records. 1. ... thumbnail 1 summary
Record boost and bury is a mechanism by which the ranking of certain specific records is made much higher or lower than other records.

1. Record boost is a mechanism by which certain specific records are ranked highly relative to others.
2. Record bury is the opposite, that is, certain specific records are ranked much lower relative to others.

This mechanism lets you manipulate ranking of results in order to push certain types of records to the top or bottom of the results list.

Endeca properties must be explicitly enabled for use in record boost/bury filters.

Endeca Experience manager provides a OOTB cartridge to boost and bury records based on selected product ids or dynamic query(navigation state). Need to customize handler if personalization required based on profile data(Individual user). Find out use case at end of this post about how to use boost and bury in personalization.

The stratify relevance ranking module is used to boost or bury records in the result set.
The stratify relevance ranking module ranks records by stratifying them into groups defined by
EQL expressions. The module can be used:
1. Record search using Ntx parameter
2. Sort Options usinf Nx parameter

The stratify module takes an ordered list of one or more EQL expressions that are used for
boosting/burying records. 
The following example shows one EQL expression for the module:
N=0&Ntx=mode+matchall+rel+stratify(collection()/record[sku.activePrice>95],*)&Ntk=All&Ntt=dress

This record search example queries for the term sku.activePrice in search interface All. Any record that has a sku.activePrice of greater than 95 will be boosted in relation to other records.


Note: When used for sort operations, you must prepend the Endeca prefix to the stratify module name for use in the sort specification.

Use case

Product Recommendation should be populated based on following rule set:-
If user profile has petType, petSize & petActivity level set then use all 3 attributes.
If user profile has petType & petSize level set then use only 2 attributes.
If user profile has only petType set then use only petType attribute.
If None is selected then show the 10 products configured in the Endeca Cartridge.
Products are sorted based on the lastBrandVisit will be promoted (if set in profile) and then start date. Sorting
Top 10 products based on the petType, petSize & petActivity selection in quiz, sorted by top seller and newest to oldest.
If less than 5 products are found based on all attributes set in profile then get the remaining products by reomving the specific attributes (remove petActivity and then remove petSize).

Solution:- 

Record boost and bury solve the above problem statement using one query to Endeca MDEX engine. Customize recommendation cartridge and pass below query as part of preProcess() method using profile data.

In Ns parameter, following kinds of query can be passed to achieve :-
Endeca.stratify(collection()/record[petType="dog" and product.petSize="medium" and product.activity="moderate"],collection()/record[petType="dog" and product.petSize="medium"],collection()/record[petType="dog"],*)
















6 comments

Unknown said...

Hi Ajay,

Which API must be used to set the Ns parameter in preProcess() method. I'm unable to find any. Please help

Ajay Agrawal said...

Hi Abhishek,

Thanks for referring. There is Class class StratifySortSpec and add instance of it to SortOptions. Make sure to set key and add it.

I hope this helps.

Thanks,
Ajay Agrawal

Unknown said...

Hi Ajay,

I tried to modify the OOTB boost and burry behavior by adding some additional rules at ResultsListHandler preprocess-strtify() method level,
where I am appending some rules with the boosted and burrid record like this,
stratify(4 boosted records,collection()/record[product.productRichAttributes.material="PVC"],*,4 buried records,collection()/record[product.manufacturer.displayName="INC"])

After this I am able to see the 4 boosted records but, its not showing the "PVC" records after 4 records. what
is the cause behind it, any guesses? I am able to see the proper filters getting applied at the dgraphRequestlog level.

If this is not doable with stratify/Boost-and-bury approach, can I will get it with the EQL filters?

The all idea behind is I can create the complex rule's on properties also and provide them in to the MDEX query time to boost the records associated with the particulate property? can this boost-bury feature support the properties also? or it only relies on the dimensions.?

For the dimension "By query" option I am able to see the below property rules, for my configuring the complex rule of properties I have to follow the below pattern by replacing the ID's with the properties ids?
stratify(collection()/record[product.category = endeca:dval-by-id(1740081931)//id and product.productRichAttributes.material =endeca:dval-by-id(3324350598)//id],*)
Please share your ample inputs.

Ajay Agrawal said...

This works perfectly fine with Boost and Bury feature. Look at the attribute name and see if there are any spelling correction needed. I did this approach multiple times and works perfectly. Could you please send me dgraph request log query to understand problem statement better.

Thanks,
Ajay Agrawal

Unknown said...

Hi Ajay,

After lots of analysis I found that when applying the EQL at the stratify query level I am getting below error,

Here when we are trying to plug the new EQL filters I am getting one weird error in Dgraph log,
DGRAPH {dgraph} Error evaluating structured query "fn:collection()/record[materialAttrib = "PVC"]": Type mismatch: cannot compare materialAttrib to string literal

Do you know why I am getting this issue.

Thanks,
Swapnil

Rajesh GR said...

Hi Ajay,

I have a question about Endeca Boosting. When boosting products, we are currently entering and selecting their list of products individually. Do you think it would be possible to override OOTB Endeca and allow a string of products to be entered at once?

i.e. instead of entering one product at a time into the “search for:” field, they could enter: 10011575, 10011765, 10011770,….etc and all 3 items would be pulled up and selected.

For a little more context, we are boosting 60 products on each category page, so that’s 60 individual products they have to input, enter, and select. It’s taking nearly an hour to complete just this part of it. we have 8+ category pages, that’s nearly an entire day or two we are spending on boosting products alone – a task that should take an hour max to update all 8 category pages.

Let me know if you think this is something we can customize. Thank you!

Regards,
Rajesh GR

Post a Comment

Note: Only a member of this blog may post a comment.

Text Widget