algolia search box: how to add filters within searchbox - algolia

I am using lagolia and have categorie field in the record added as facet and also location field
I want to create a search box something like
How can i do this

With both of those, the easiest way is going to be to use InstantSearch.js and the built-in widgets.
For the Categories, you'll use the refinementList widget. This will pull the categories based on the attribute name for the data. You can use the templates property to define how the categories get displayed.
GeoSearch will always be a bit trickier. To do this with InstantSearch, you'll want to refine your search based on Latitude and Longitude. You can create a custom parameter to be inserted into the search when search is run. To do that, you'll customize the searchBox widget with the queryHook parameter. In the query hook, you can add the aroundLatLng parameter to your search.

Related

Using Azure DevOps API to get Work Item Types Field values for a field that has dynamic data based on the value of another field

I'm using the API query
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?api-version=5.1
with great success to get all of the allowed values for my fields. The issue is that the options to one of my dropdown menus is populated based on the selected value of another dropdown menu. Is it possible to pass a value to this GET query and then retrieve all of the allowedValues for this dynamically populated menu?
I'm afraid that this is currently impossible to pass a value to this GET query and then retrieve all of the allowedValues for this dynamically populated menu.
Work Item Types Field-Get rest api should only get the allowedValues of a specified field, cannot implement the logic of returning the allowedValues of this field based on the value of another field.
In addition, according to URI Parameters, you also cannot add the value of another field as optional parameters to the url for conditional filtering .
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

DOMINO REST API get Collection sort column

Hi I'm trying to get a sorted Collection from the Domino Rest Api. My database name is "Test/JSON_Views.nsf" and my views name "List".
The endpoint I use is
**/Test/JSON_Views.nsf/api/data/collections/name/List?sortcolumn=title&sortorder=ascending&count=20
But the JSON-Response entries aren't sorting by title in ascending order.
Should I make any settings to the column properties in the designer? If I set descending there for the title-column it works. But I want to change the sorting in my external java-application.
Is my endpoint correct? I use this Domino API Docu as Reference.
Add an additional sorting to your title column:
This gives the API the possibility to sort by title in both directions. You can do this with other columns too so you are very flexible in sorting this way.
The doc says that if the column isn't sorted in design then the sortcolumn parameter has no effect, so the answer is "Yes" you should change the design of the desired column. If doing that is unworkable in whatever context you use it, then create a second view and use that instead.

How to set display value in SAPUI 5, SmartField Value Helper field.

Hi: I am looking at the standard SAPUI 5 Smart Field demo:
https://sapui5.hana.ondemand.com/#/sample/sap.ui.comp.sample.smartfield/preview
I would like a field with a value helper, such as Currency on this screen, which displays the field description inside the input box instead of the field id.
Example:
Change the Category field from combo into a value helper (popup)
Get the field to display the CategoryName - or from the related table the LTXT field instead of the ID.
HowTo
That is easy: delete the line
from the metadata.xml file.
??? I have tried many, many things.
I doubt that anyone will reply, because there is most probably no good answer.I do not find this good functionality.
I think that I will need to change my ID field values for popup (value helper) fields to Description (ID) . Description need not be unique (one can have two relations to the same company with different ID's.)
By doing this we also "fix" the problem with the search ODATA command which searches the ID field. Of course users will want to search the descriptions.
In general SAPUI's value helper is not great. It is normal practice to use numerical ID's and descriptive descriptions. The description should be displayed and searched and not the ID. I found their filter generator on the popup screen nice - it is not all doom.

Get more product field value in Algolia json data

We are using Algolia extension for Magento 2. We added 2-3 field in the products, so we want to show the value of those fields on instant search result page. As we checking the view/frontend/templates/instant/hit.phtml is in use, we want to add the custom attributes to the JSON data so we can fetch those attributes value and show in listing page.
First you have to add new fields to Algolia product index if not already added. You can use one of the custom backend events. e.g. algolia_after_create_product_object
Once your fields are indexed properly (verify from Algolia account console), you should be able to get those in hit.phtml

SAPUI5 Filter Search

I'm Developing Fiori App with Master-Master-Detail template,
First I'm filtering by date but I want to use the search box that it's generated by default.
I need to use both condition filters: Date and the element specified in serach box.
Somebody knows how to add search filter without remove previous filter?
The filters are applied to the ListBinding and there is no official API to access to current filter objects. You could store the filters somewhere in your controller, but eventually, you'll need to call the filter method again with all the filters that you want to apply.