Azure Search suggestions setup - azure

I've created an instance of Azure Search and I'm trying to make use of the suggesters functionality but struggling to find any useful information on how to get started (poor and out of date documentation from Microsoft).
I would like to use a suggestion on the name field below.
The issue is that fields require unique names and I'm unable to edit existing fields. I'm a little unsure of how the suggester tab differs from basic.
Does anyone have any advice on how best to add suggesters to my index? I am all for deleting the index and starting again if I've missed something critical.

I'm really sorry you're disappointed by the documentation. We take it very seriously and will make sure to address your feedback. Feel free to make suggestions.
On the screen you provided, you should specify a name for the suggester. Once you do that, checkboxes will show up next to your field names. Using the check boxes you will enable the Suggestions API on selected fields.
Use the name of the suggester as a value for the suggesterName parameter when using the Suggestions API : https://msdn.microsoft.com/en-us/library/azure/dn798936.aspx
Please find more details in this article about suggestions in Azure Search. It describes a sample application with code attached.
Hope that helps.

Related

Grav - Parse URL

I want to define a new template called "product".
This template calls an external service and retrieves the information about that specific product. That is easily done with a custom plugin that access the product information. Information on how to do that has been found here.
However, I would like that the URL of the page would be something like:
/product/<id>/<seo-friendly-description>
So I can retrieve in the Twig template both <id> and <seo-friendly-description> which will be used later to retrieve the specific product information.
I have tried to find something that could help in the documentation, without success. Could someone either point me to the right doc section or highlight the basic steps that shall be achieved so I can start solving this issue?
Just in case it helps, I am trying to find something similar to how bottle or other web frameworks work:
#route('/hello/<name>')
def greet(name):
return 'Hello ' + name
I've been building a family recipebook into my own website and I've been working through a similar problem. I haven't quite worked out all the kinks, but my solution is mostly working if you want to checkout my github repo.
In short, you need the plugin to watch what the active route is. If the route matches, you then create the page and populate it using your plugin data.
I haven't quite figured out how to get the active page to highlight in the navigation menu for generated pages, but you might still find this solution helpful.

Search a specific search of a journal article based on the user type

I have this requirement:
We have a journalarticle and we wish to have sections which have content for internal and external users for the application.
We are able to hide the content from rendering by implementing custom template on web content display and using a simple custom-field for a user which helps us to classify it.
Having said that when we search something as an external user, the search portlet is able to fetch an article where the search text is a part of internal user content, and due to the above mentioned template the content is not visible.
In short, from the user's perspective the resultant article does not match the searched term.
I wish to seek some pointer to check whether there is a mechanism to ensure that when an external user searches something then we only search the dynamic-element of the doc which matches the user type?
We have thousands of such articles and create multiple copy of the same article does not seems viable solution.. so any pointers would be a great help.
Liferay version : 6.2 GA4 CE
Thanks!
AJ
First of all: Not finding a search term in a document can be a sign of good working synonym resolution in the search engine. It's questionable if this behaviour is always wrong or only in this particular case. Remember google bombs?
That being said, I believe that this architecture of half-visible documents is flawed from the beginning. Ideally I'd suggest to change it, for example by splitting the information to two articles, so that you can use the standard permissions to resolve. If you link both, you can determine how/which article or template to use. It's not an ideal solution, but might be a workaround.
Another workaround might be to change Liferay's indexer component and index two different versions of the article, with two different permissions. Of course, you'll have to change the search side as well, so that you'll find each article at most once, even if it's now twice in the search engine.
Again - not ideal, but might be the quickest fix that you can get right now without changing the underlying architecture. However, to change the underlying architecture is my actual recommendation.

CRM 2011 using pre-image in plugin

I'm looking at using a pre-image for one of my plugins so i can get values in fields that haven't been changed. I've registered a pre-image for the entity in the plugin registration tool but when I've put some code in that tries to check it it doesn't find the image. So i was wondering what it was that I've missed that is stopping it from working. I've searched Google but couldn't really find anything, cant anyone help?
Thanks
Have you ensured your string key in your code matches the image you have registerd for your plugin step?
For example.
Your code: Entity entity = (Entity)context.PreEntityImages["Target"];
Then your Entity Alias and Name when registering the image should also be named to Target.
Jimmy, assume you are not triggering the plugin during a create operation as the pre images are not available during create.
This is another possibility that the one mentioned by peter and robben above.

Export list of Sitecore items as Excel (or other formats)

I noticed that sitecore has the option of exporting users in an Excel format.
I need to have similar functionality for exporting 'participations', (a users can enlist to take part in an 'event', and if their entry is approved via a sitecore workflow, a 'participation' item is created in the content tree)
Since mostly everything in Sitecore is in essence based on items, and I want to export items to Excel, my question is - what are some of the best ways of doing this?
Questions:
Is there a way to re-use this functionality for regular items?
Would it be a good idea to create a custom admin page (any tips on doing this?) which has some custom code that reads the items from the database using the API?
are there sitecore plugins/shared source projects that can help me achieve this?
Or does anyone have a better idea? - would it be better to just store the participations in SQL? I'm mostly doing it this way because I want to make use of the 'free' functionality offers, for example workflow, but if that leads to me using anti-patterns please shoot me ;)
Link is different now: https://marketplace.sitecore.net/en/Modules/Advanced_System_Reporter.aspx
P.S. Couldn't leave a comment to original answer as I don't have enough reputation. Oh well :)
Found a most excellent shared source module which does exactly this (and much more)!
Basically it allows you to configure (and easily extend, if you need to) any kind of table based report on 'items'.
The report module shows up as an application in the sitecore menu (like the user manager tool) and comes with features such as xml,csv, xls export. It's also really easy to set up, once you get the hang of it.
http://trac.sitecore.net/AdvancedSystemReporter

Rad grid custom filtering

How can I activate custom filtering for my radgrid?(I googled but I didn't get any proper response regarding this)
I have a property like AllowCustomSorting but I don't have any property regarding filtering.
Can any one provide the way how to implement custom filtering?
If possbile give me a sample page then I will understand.
Thanks in advance.
All you need to know about filtering:
http://www.telerik.com/help/aspnet-ajax/grid-basic-filtering.html
I usually do my filtering/sorting within my stored procedures as that brings huge speed benefits when working with larger tables.
I'm aware this is a fairly old question now but this link should help you:
Note that it has a sample project at the bottom of the page.
The property you are looking for is AllowFilteringByColumn="True"
This page has a sample using a dropdown and a custom filter.

Resources