on 2018 Jun 08 12:50 PM
The documentation on "Creating and managing Boost Rules" for Adaptive Search shortly mentions the "matches" operator but does not elaborate on it. From experimenting I found out that apart from excatly matching a term it is possible to use the asterisk * as place holder, allowing to simulate operators like:
contains: *something*
starts with: something*
ends with: *something
What are the complete capabilities of the "matches" operator?
Request clarification before answering.
To answer my own question after a few more experiments:
Actually Adaptive Search just takes the expression and throws it at Solr without any further consideration. So the asterisk works because Solr resolves it.
So for example, if you create a boost rule in Adaptive search for the name field to match the expression "Honor" with an additive boost of 10, this turns into:
name_text_en:Honor^10
Essentially you can use everything Solr support in the expression field.
To search for the phrase "Medal of Honor", use "Medal of Honor"
To search for items in a list, use for example (Call OR Honor), which would boost both "Call of Duty" and "Medal of Honor".
Note however that you cannot combine lists and phrases. So for example ("Medal of Honor" OR "Call of Duty") will boost names with any of the words "Medal", "of" or "Honor" resp. "Call", "of" or "Duty" (actually "of" is ignored as stopword). So also "For Honor" will be boosted.
Also be aware that all the differences between fields of type text and string apply. If you are using the B2C standard configuration, string is case sensitive while text ignores case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kamal, i had the same issue when trying to boost products with an image in the adaptive search extension with the rule that worked fine in the commercesearch. I got in touch with the hybris support and they told me that there is a problem with attributes that aren't available on each item, like the image attributes that are available when theres in image, but when not, they are not empty, they are just not there. So they came up with another solution to this: make a new attribute with a flag which will be always available. So i made a value resoolver (on 6.4 you maybe have to use value provider)wich return true when there is an image and false when not. That worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thomas, I am on version 6.4 and trying to create a boost rule with that "matches" attribute. It does not work even if I provide *media as the value. I am trying to boost products with a solr attribute xx of value containing media. If I provide exact value then only it works. Did you figure out how does this work ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.