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

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?

Related

Get Most Frequently Bought products together in a order (Excel)

I am analyzing a excel sheet with column A as order ID and column B as products under those order ID. My task is find the most frequently bought products together. I am attaching a sample sheet for example.
My expectation is to get the count of most frequently bought products together.
Example of the data i am looking

issue with the usage of BELONGSTOMANY or HASMANY on sequelize

I've been using NODE.JS - SEQUELIZE to deal with POSTGRES database. But, it's been a while that I am facing an issue.
I have two TABLES:
FIRST TABLE: Purchases. Inside of this table, there is a column which keeps the foreign key of the Products table, because they are associated. But, as long as I'veen been coding, I realized that I needed to "insert" more than one products at once, like an array, for those people who will buy more than one product at once.
SECOND TABLE: Products.
I want something like this => Allow to a purchase inside of Purchases to have more than one products associated with. But all that I can do is make the product foreign key column in purchases table accepts only intenger (ID) of only one product.
For exemple:
The user X buyed multiple products, so then in product in Purchases will have the products [1,3,5] and these numbers are the product's ID that I would like to associate with the Products table.
print of the PURCHASES MODEL: purchases MODEL(not the migration) on sequelize
print of the PURCHASES TABLE: purchases table structure
print of the PRODUCTS TABLE: products table structure
The conclusion I've have reached was using "Belongs to MANY" or "Has many", but I don't how.
Thanks.
I propose you to add another table to achieve multiple products in one order:
ORDER table - stores one record per a customer order (all columns that related with an order as a whole)
ORDER_ITEMS - stores items inside each order (columns: a link to ORDER, a link to PRODUCT, a quantity, a price and other related columns (a discount and so on)
PRODUCT - stores a catalog of products to buy

How to add product and product category in quotation pivot list in below list like sale analysis in odoo 11?

[in sale analysis on total two list product and product category there. same things I want to add in quotation pivot table how can I add?
That is not really possible, because the BI (Business Intelligence) reports (you called it "sale analysis" in your question) are actually transformed data with sales order LINES as base. And the pivot of sales order are based on sales order. You don't have product and product category information, because you have a one to many relation to order lines where this information is belonging to. It's only working the other way around (lines information -> order information).
So the solution is probably extending sale analysis (i think the model is sale.report) with every other thing you're missing there instead of changing the pivot of sales orders.

Prestashop: Add a single product attribute on the product list / product page

I'm working on a shoe store. Each shoe has some a product attributes: the brand, size, model,...
However each shoe always only has 1 brand.
So i want to display the brand attribute beneath the product name in the product list.
I added a screenshot for more clarity. http://imgur.com/a/41HLS
You have the product name 'boots / enkellaarzen'.
Under that you have the brand name 'baci'. This name has to be dynamicly 'retrieved'.
Is this possible? If so, how do i do this?
Tldr: what is the shortcode to retrieve a product attribute in prestashop?
If it's a brand wouldn't it make more sense that the brand is manufacturer and not attribute?
You can set it in the product tab Associations at the bottom and display it in the template product-list.tpl with
{$product.manufacturer_name|escape:'htmlall':'utf8'}

solr - define 1:n:n relationship

I have created a flat table from my DB and defined a solr core on it.
It works excellent so far.
My problem is that my table has two hierarchies. So when flatted it is too big.
Lets consider the following example scenario
My Tables are
School
Students (1:n with school)
Teachers(1:n with school)
EDIT: Consider that all tables in my example have two columns: Name & Description which I would like to index and search and the searches are user generated freetext search over those columns.
Now, each school has many students and teachers but each student/teacher has another multivalue field. i.e. the following table
studentHobbies - 1:N with students
teacherCourses - 1:N with teachers
My main Entity is School and that what I want to get in the result.
Flattening does not help me much and is very expensive.
EDIT Problems with query
When you query a flat table by school name, as I described, if the school has 300 student, 300 teachers, 300 with 300 teacherCourses, 300 studentHobbies,
you get 8.1 Billion rows (300*300*300*300). Searching for the school name will retrieve 8.1 B rows.
Can you direct me to how I define 1:n:n relationships In data-config.xml
Thanks.
Found it
a documentation of 1:n, 1:n:n and n:n relation

Resources