How to apply filters automatically based on search term? - search

Is it possible to apply filters/facets automatically based on search term?
For example, If there are two facets called "Category" and "Material" ,and If user searches for the term "plastic water bottles" where bottle is one of the category
(Catergory=bottle) and plastic is one of the material facet(Material = Plastic).
I am looking for the option to enable/force search engine to filter based on category=bottle and material=plastic automatically when it has matching terms in the query.
Please help.

This is not possible. It is possible to trigger oneboxes, keymatches and related queries based on keywords.

Related

Saved Search criteria/results seem to have a different naming scheme from everything else

I'm trying to find a resource or explanation for how to determine how a field will display in the criteria or results dropdown of a saved search. For instance, in the results I would like to see the PO# field (fieldId:otherrefnum). But when looking through the drop down, I see neither of these as options. This has been a serious source of frustration for me with many other fields, I'd like to find a definitive way to avoid wasting time on this in the future.
Thank you!
There are a number of contributing factors to this.
The field names you see on forms may have been re-labeled by form customizations
Netsuite normalizes transaction searches to which leads to some (IMO) odd column name re-use.
A lot of old fields or fields tied to functionality (e.g. transaction status fields) don't follow the regular pattern of numeric id and text name.
The records browser helps quite a bit. You can search here and see that otherrefnum is named 'PO/Check Number' in the search editor. (An example of field name normalizing referred to above)
If you look at transaction you'll see it is just search filters and columns. If you compare to Sales Order you'll see something perhaps more familiar in terms of fields.
Even armed with the records browser experience is still needed. e.g.
A sales order has an items sublist and one of its fields is itemtype. In order to get that value in a search you need to select Item fields and then choose Type. A Sales Order's items.description column becomes the line level memo field in search results.
Hope this helps

Adding Search box outside ag-grid

I look at this example, this allows to search for all columns. How to I searrch for either two columns only? E.g. I want to search Name or Country? Is using api.getSelectedNodes() and filter, the best way to do the search?
https://www.ag-grid.com/example.php#/
I would say the best solution would be to set an empty value for the search value for each of the columns you do not want to search through:
colDef = {
getQuickFilterText: () => ''
}
Take a look at this questions.
More documentation can also be found here

Alteryx Analyse the similarity of the words

I am currently doing out the top 10 types of fault chart. So the user will key in what is the fault about, ex. light bulb fused. As it is free flow text box, the words may not be the same. Is there anyway to make Alteryx understand that some words may be the same, allowing me to find the top 10 types of fault. Thank you.
You have a couple of ways. You can use the Fuzzy Match tools in the Join category to sort out slight spelling mistakes. You can find Alteryx examples of Fuzzy Match on Youtube.
You can also use the Record ID followed by Text to Columns (Split to Rows based on space) to get a list of single words.
In what you are trying to do, I would advise building up a bit of a lookup table. You can then use the Find-Replace Tool to Append the Category from the lookup depending on the words that are found.
Depending on the cleanliness of your data and how different each category is will guide you as to how far down the above paths you should go.

Search for exact term in an Algolia index

I want to filter an index by an exact value of an attribute. I wonder what possibilities Algolia offers for that.
Querying an index always results in a search for substrings, that means a search term abc will always match any object which attribute values contain abc. What I want to achieve is a search for abc that finds only abc as a value of an attribute (in this case I have specific attributes to search in).
One possibility I came up with was tagging, which doesn't seem to be the best way to think of.
Edit
I think I could also use facet filters. I thought about the different pros and cons and can't come up with arguments that places either one position above the other.
You're right with your edit that facet filters would be the way to go on this one. You'll get the exact match you're looking for and won't have to create a new attribute of _tags to use the tag filter.

Solr get field where the maximum keyword match was found

I am not sure if this can be done with solr. But this is what I am doing for an online store search functionality. The main search box is a dismax parser for multiple fields :
qf: description^1.0 color^1.0 name^1.0 size^1.0
Equal weight across multiple fields for now. Further I create a facet on some of these fields
ex: color, size. The client has a request that when they search using a particular keyword and it matches any of the faceted fields the filter appear selected in the front end. So if the user searches for 'red' The color facet for red should appear selected.
Since solr is searching across multiple fields I don't think this is possible or is it?
It is not about Solr. First, This requirement is flawed at user experience level. Traditionally facets (also known as guided navigators) are used to filter search results. Just having "red" across multiple fields does not mean all the products appeared are colr "red" .
When you have "red" selected in Co filter you are visually telling user that all products in search results are "red". If that is not the case do not do it.
It that is the case, then ideal situation is, when the user enters "red" , you should first check user input against colr facets (preferably against cacheed list) and then add that color as filter to query as fq=colr:red parameter so that it is "true" filter and is part of your search query. This can be done against all known displayed facets (colr,size etc.) very quickly and activate them automatically if there is a match. Used right, that would actually make a cool feature.

Resources