How to achieve hierarchial filter in facets in typesense - vue-instant-search

I am using vue instantsearch component in the frontend UI with typesense. I have a particular use case to achieve. Please guide me how that could be achieved.
I have a product data and hierarchical category. I have already achieved normal search by facets such as category , brand, price and rating. However my requirment is as:
Clothes
->Mens Clothing
-> Tshirt
-> Pant
-> Womens Clothing
-> Tops
-> Ladies pant
Taking the example of above hierarchal category. I would like filter the product by category. eg. (Mens Clothing) then I would only like to see Tshirt and Pant in the category facets ie the children categories of Mens Clothing only.
Let me know How can I achieve such.

Related

What is the proper way of Seach working on Magento 2.3?

I've got a question with Search on default engine - MySQL
There are products in searching results which have the following coincidences:
Product headings.
Product description.
Product category name (it the name of the category connected to searching query)
Product headings at Related Products, Up-Sells, and Cross-Sells under the product card description.
Product headings at Configurable products under the product card description.
Is everything ok? Or the last two cases are out of results should be?

Azure search filtering performance over Edm.Int32 and Collection(Edm.String)

I'm using Azure Search on my e-commerce site, and now want to implement filtering.
I've faced issue with performance. I have index with products. Each product belong to category. Each category can have nested subcategories.
My business purpose is when customer is on category page i need to show products even from subcategories, so i have doubts about how to store this relation(products to categories) in azure products index.
I'm considering two possibilities:
I can store only products category id in field with type Edm.Int32. Then when customer goes to this category i query to my sql server to get all subcategory ids and then construct my query to index like this
categoryId eq 34 or categoryId eq 36 or categoryId eq 37 ...
Other way is to create field with type Collection(Edm.String) and to store products category id and nested categories ids in this field and then my query to index would look like this
categoryIds/any(c: c eq '35')
So which way will be faster?
Option #2 is likely faster since the number of documents in the index will be far fewer, but the only way to be sure is to run some experiments with your data and queries. Overall query performance is going to depend on other factors like whether you're doing full-text search, faceting, geo-spatial, etc.

Solr: Apply faceting when query contains particular terms

I have a database of product information indexed by name, type, manufacturer, etc. Users often submit search queries whose results would be contained neatly in one or more facets. When this situation arises, I would like for Solr to parse the query and apply the relevant facets.
For example, searching shoes should return results in the shoe category. More ambitiously, searching plaid shirt should query plaid on items in the shirt category.
Is it possible to configure Solr to do this?
Thanks in advance.
Asking Solr to do what you want is a tall order. Your best bet would be to store categories in a field that is weighted very highly. For example, if you have a category field with the value of "shoes", having a hit on that field will increase the relevance of documents on that category, thus having them show up first. Same goes for the second example.
As for faceting, your question is not clear on how you want to apply faceting.

Cassandra Data Model Design

Suppose I have have a huge list of movies categorized by genres. Users can vote for movies, and each movie can be in multiple genres.
What is a good way to store this in Cassandra if I want to present the top X movies per category? Please ignore other use cases as I can have other column families as required (like presenting detailed movie information).
Action
Movie A
Movie B
Movie C
Comedy
Movie D
Movie E
Movie A
Based on the information you have presented -I say that you only gave requirements to create a single column family.
The columns would be - movie name, category, and any other attributes about the movie.
It is quite common to create several column families with different structure that are like 'materialized views' of original column family.
In Cassandra you design column families based on how the application is going to use it. So, you design your queries first then you design the column family to support it.

Roles and Hierarchies in SSAS

I'm having an issue with security on an Analysis Services cube.
I have a dimension, that I need to restrict access to, based on a number of secured fields.
The dimension (Animals, for example) has 5 attributes including :
Id
Name
Gender (Secured Field)
Food
Eye Colour
I need to be able to create hierarchies on this, as :
Gender -> Id
Food -> Id
Eye Colour -> Id
There will be two roles on this Cube, one with access to everything, and one with no access to Id's when using secured fields. However, if the user is filtering by Secured fields, they can see totals against the secured field.
So, if querying against Gender, they would see 20 Male and 20 Female, but wouldn't be able to see the Id's of the 20 Males. A secured user would be able to see the 20 Id's though.
Is this possible, and if so, how would you prevent bypassing the security by filtering on Gender = Male and adding another non-secured hierarchy into the query (such as Eye Colour -> Id) to get the Id's that way ?
Thanks for your time

Resources