Can I search multiple indices using the InstantSearch Library? - algolia

My search objects in Algolia contain a field called SOURCE where I store which of our content silos I'm getting the content from.
I've used the InstantSearch library to create a nice search interface that uses the refinementList widget to let the user filter by the source system. This works well enough.
Now I realize that I'd prefer to store each silo in a unique Algolia index, but I still want a single search UI.
I'm not seeing that the instantSearch library supports this. Can it? Can anyone point me to some sample code?

One way to let your users select the source would be to use a sortBySelector which lets you select different indices.
You can find more information about it in the InstantSearch documentation.

Related

Instantsearch filter by custom function

Due to certain limitations I am not able to index categories and subcategories so I need a way to be able to filter a list of manually created items. It's actually a two part thing:
1: I am filtering the visible results via a toggle switch
2: I now have a submenu (also manually created) with multiple items which need to be sortable as well.
So when I click on any item it filters. The behavior should be the same as in this demo.
This part, to be specific:
The issue I'm facing is that I don't know if this is possible at all. Yes, I looked at the obvious places but could not find anything helpful. Again, the list is created manually so I'd need some custom function to highjack the instantsearch results, I guess.
Any help is much appreciated.

Word API Custom Properties

I need some help on word add-ins
I will be programmatically creating a document and as part of that I need to add custom property (Pub_Doc_ID) to the document, as in the picture below.
I am using Word Java APIs now and could not find a way to do this job. The work flow I am targeting is very simple. Create a Document, get the Pub_Doc_Id from DB which is primary Key and assign to the document. Now primary key is attached to the document, so it will be lived with document.
Some more background :
As I mentioned earlier I am using Word APIs. I am adding text, sections, images etch. Now I need to have one connector (Pub_Doc_ID) between Doc and DB. So wanted to use custom properties. If there is any better way to do it. Then let me know.
I know how to do this in VSTO. I am looking for Word Java API.
This pub_doc_id ID then I will be using to call API's and to load task pane.
Thanks, really appreciate any help on this.
*Pub_Doc_Id : Publishing Document ID.
R/W access to custom properties is something my team is working on and would be delivered towards the end of the year.
Seems that for your scenarios you don't necessarily need to store that information as a custom property and you have a couple of alternatives in the meantime:
You can add your own customXmlPart to the doc to store this information. Here is a great example on how to use this: https://github.com/OfficeDev/Word-Add-in-Work-with-custom-XML-parts/tree/master/C%23/CustomXMLAppWeb/App
You could also store it a setting of your add in. Check out the settings object and how to store and retrieve settings: https://dev.office.com/reference/add-ins/shared/document.settings
Hope this helps!!
Thanks
You cannot presently access custom properties via the JavaScript API. They are currently working on it and have put information about proposed APIs on GitHub

Repeatable data content in umbraco

I am just wondering is there any plugin to create dynamic content for a page i.e something similar to a data repeaters in .net. To make it simple it should be a section that should contains 5 to 6 fields/property like
heading
heading 2
image
content - rich text editor
info
This must be in repeatable control so that the editor can add any number of these section a page and all these should be displayed in a single page.
Is there a plugin for the above functionality or what is the best way to achieve this.Any help would be greatly appreciated.
Thanks
Aneesh
You can achieve this without any plugins.
Create your repeatable section (containing the relevant fields) as a document type, and then use the multi-node picker in another document type to select one or many of the sections.
So for example, I could have a FAQs page (which uses a document type called "FAQs Page"), and I want to be able to add multiple question and answers to this page. I could set up a document type called "Question". This will contain two fields: Question and Answer.
On the "FAQs Page" document type, I would add a multi-node picker field called "Questions". This way, an author could select multiple "Question" nodes to appear on the FAQs page.
You would obviously need the code to output this, and also you would create a data type that inherited from multi-node picker, so that you could limit the selection to only Question nodes.
There is also the Repeatable Custom Content datatype which works well but does not support all data types. But it does support all the ones you need for your stated purpose (textstring, media picker, richtext area, etc).
You can find it here: http://our.umbraco.org/projects/backoffice-extensions/repeatable-custom-content I've used it a few times and it works really well in certain situations (e.g. where the items will not be shared across different pages of your site).
If you are sharing content components across multiple pages then #Digbyswift's solution is perfect.
I've always Digbyswifts method, but whilst looking for an alternate solution tonight I found this plugin, which is excellent for those situations where creating lots of widget nodes feels like overkill. It's licensed but the free older version is also available.
http://inaboxdesign.dk/blog/widget-builder-for-umbraco/

How to get filtering to data lists in Alfresco Share (Community 4.0)

How to make filter by specific columns available to data lists in Alfresco Share? Version is Community 4.0. I've tried the existing solutions like fme datalist extension answered here but it has some issues which require customizing the code more than I've got time and expertise. For instance, it loses all custom lists. I tried to add the list definitions from the XML configuration to the embedded definitions but it made the whole site crash.
Is there any other way to achieve filtering? The specific case is that I've got a list which has like ten or so columns. I want to make one or two of them filterable by providing a simple drop down menu of unique values.
Unfortunately it is not possible to filter data-list items out-of-the box in Alfresco Share. The FME extension is the only solution I have seen which will do that for you.

How to add Filter to my Combo?

I have a SWT combo box which has items more than 100.
For more efficient selecting, I want to add filter on combo box.
I have searched for this, but I cannot find appropriate comments.
Please let me know what is the best way for this.
Thanks.
I know it's not pure SWT, but if JFace is okay I find ComvoViewer API gives me the appropriate points, allowing me to to implement my filters. See the ContentProvider API, and specifically the inputChanged lifecycle.
As far as I know, SWT uses a simple model of adding an array of Strings as items using the setItems() method, but does not allow filtering like the JFace viewers.
So I think, the only solution is to filter the elements either before adding it using the setItems(), or using the add()/remove() methods (either based on indexing or Strings).