-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single preview or draft rule publishes #127
Comments
I wonder how much sense it makes to try and deploy single rules. A query might trigger more than one rule (eg. if you have a rule for
|
We are publishing single rules (or smaller rules collections) already because we want Search Managers to have a quick way of testing and maybe tuning a rule before it is deployed to all users. We do not use any testing/staging environment because we don't want to invest too much into having a production like environment regarding data. So we only use production. Valid point though regarding multiple rules that might be triggered. For now we are generously ignoring it and have not suffered from it (yet). Mainly because our rules collections are not that large and usually a single rule is triggered, which is the new one. |
I've noticed in my various projects with SMUI that there is a continuum of folks from the "Let's treat Rules like code and put them through a more full testing cycle" camp at one end to the "This is a activity that I do all the time in production and it's okay" ;-). I've been wondering if we could get to a place where we have real time analytics/alerting to let us know when we make changes in production that really change things, so that we can have more confidence in creating rules in production. |
I think the information should all be there to do something like that. We make use of the querqy info logging feature to segment queries that triggered a rule to monitor their metrics. Just to clarify because my comment was not clear enough: We are not directly deploying rules to all users but rather deploy them to a separate "draft rewriter" that can be applied e.g. using URL Params/Headers. Once the SERP looks good to the Search Manager, the rules are deployed to the rewriter serving all user queries. |
Hi, thanks so much for your input. I see some common themes:
Is what I meant here with:
I almost assumed, you are ignoring this for now. Would be interested in feedback / input from your SMs while your rule collection evolves and grows (other installations might have a larger "rule stock" already, but I don't know for sure ;-)). @epugh : Thanks for sharing this experience / perspective. Rules should not be treated like code, but rather like payload or editorial data. I agree. On the other hand, those (rule) data have the power to influence the search algorithm - and thereby, the experience massively. Automatic regression tests IMHO do not necessarily constraint only to code changes, but to all aspects of the product quality. I.e., for an ML ranking model, you probably also want to introduce automated checks, plausibility (top ranked products on top queries etc) and the like before this data artefact goes into production too. Also, I am a big fan of more data driven search management with monitoring - maybe even alerting - aspects, but I think this is a different story ( though, I like the impulse! ). |
That is possible (at least with Solr). SMUI log statements have specifically being designed to connect the triggering of rules (and which rules) with the analytics system on the frontend (like Google Analytics). There are super-interesting analyses, and business-relevant insights you can draw from such a setup, but I also think we should discuss this in a separate topic ( as it is only remotely connected ). |
Side note regarding this topic: Some time ago there was a discussion around #86 , also incl. you, @dobestler. Was the idea for this PR also motivated by the idea of draft rules? Or was this about tenants? |
Let me try to conclude to get a nice concept eventually: The primary motivation for this feature is to enable Search Managers to immediately see the impact of rules while they are drafting (editing) them in a realistic (LIVE) setup (product data especially). Performance is a concern of this feature request - not its root cause. Also, not wanting to have immediate search end user impact while drafting the rules - but still seeing their impact like an end user - is required (but this should be possible instantly). What is understood so far? Evaluating the whole rule pipeline performance from SMUI (Search Manager at the frontend) to the querqy Rewriters, that will eventually enhance/modify the query, depends on various "moving parts". I see:
I assume your point , @renekrie ( and also partially yours , @epugh ) , is that the performance of the querqy takeover - even of large and many rule.txt files - should not enter a human perceptible region. Let’s assume an extreme case:
I also believe that the rules.txt deployment, after the SMUI handover, might be the performance bottleneck - especially in cases of a full rules.txt export. Custom deployment implementations might have added additional business logic like regression testing to the deployment which also slows down the process. The search manager should see the impact of rules:
Now, I see 3 alternatives to reflect this technically with the querqy Rewriter setup: (1) “Straight forward solution”: The Rewriter setup is not to be touched. Additional (2) (3)
🤯 Let me know if you see more or other alternatives that I might have missed here. Please feel free to also share your thoughts on the alternatives and the Pros/Cons especially. |
It was about Draft Rules. Same goal that we can achieve now with the new Copy Feature in a IMHO better way for the time being. |
Search managers have no easy way to preview the impact of single rules they are currently working on. SMUI only enables the deployment of whole rules.txt files that belong to a rules collection. This is disadvantageous, e.g.:
Note: Rules and spellings will be treated the same in the context of this improvement proposal. Also rules.txt incl. spellings will be used for simplicity.
Deployments to optionally configured PRELIVE instances, might be as time consuming as LIVE deployments. Also, PRELIVE instances do often not come with synchronous data compared to their LIVE equivalent (product data especially).
Goal: Enable publishing single rules in a draft status - robust & fast!
The (querqy) search tech stack:
Assume the following setup:
A (1) search frontend processing the user (URL) query,
and a (2) search engine (like Solr or Elasticsearch, to respond to the query) with a querqy Rewriter-Chain that is connected to the SMUI rules.txt deployment process.
A typical search query might enter the system like this:
https://example.com/search?query=laptop
The corresponding querqy Rewriter-Chain might enhance the user query like this:
common --> hyphen --> replace --> wordbreak
common
andreplace
, in this example, receive rules.txt input from SMUI via the described deployment process.hyphen
andwordbreak
work without SMUI input.Single preview or draft rules should not be part of above’s productive Rewriter-Chain for the search end user. On the other hand, their impact shall be previewable in the LIVE context by the search managers who work on these rules.
Acceptance Criteria:
Side criteria: The final rules.txt deployment, having the final impact on the search end user experience, should still be testable like suggested above (plausibility/regression tests).
Note: There is also the possibility of two search managers concurrently working on the same rule draft.
Introducing drafts to the (querqy) search tech stack:
Challenge / search manager UX hypothesis: While using the preview, search managers want to experience the impact of all rules end users experience, but with the additional flavor of draft rules. This means more specifically:
To ensure a clean separation of (single) draft rules vs. the whole set of productive rules.txt files, draft Rewriters are suggested, e.g.:
common_drafts --> common --> hyphen --> replace_drafts --> replace --> wordbreak
This way, integrity of rules.txt file deployments for the search end users can be ensured with every (also time consuming) process necessary, while it technically only needs to be ensured draft Rewriters never apply to requests from end users (vs. requests from search managers). This can also be test automation ensured in the (querqy) search tech stack.
Request flow for the search end user:
--> search frontend: https://example.com/search?query=laptop
--> The
common
Rewriter applies the following rule:Request flow for the search manager:
--> search frontend: https://example.com/search?query=laptop&smui.user=paul_bartusch
--> The
common_draft
Rewriter applies the following rule:The Rewriter containing the draft rules can also be created dynamically.
The
smui.user
URL parameter can be part of the preview_link as introduced with v3.15.Security note: Making draft rules accessible via the search frontend by adding a URL parameter incl. the clear text username of the search manager might be easily replicated by an outside party (and also easy to spoof). This is either be accepted or prevented by a more advanced security architecture (e.g. VPN access or other encryption/decryption techniques).
(?) Discussion:
smui.user
querqy annotations can also be part of the maincommon
andreplace
rules.txt input as second versions of the inputs (making dedicated draft Rewriters obsolete). But this way, still the whole rules.txt deployment process incl. time consuming processes eventually are part of draft deployments.common
Rewriter when a “laptop” search frontend query is triggered by the manager (instead of the end user)? The way it is suggested here, seems to impose the risk of overlapping rule application (draft vs. LIVE).(!) Next: Concept evaluation of the search manager experience for (single) draft preview rules in SMUI.
The text was updated successfully, but these errors were encountered: