-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding projects created for content about hybrid search for an ecommerce #343
base: main
Are you sure you want to change the base?
Adding projects created for content about hybrid search for an ecommerce #343
Conversation
Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/elastic/elasticsearch-labs/pull/343 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've suggested a few minor code styling considerations. Logic-wise it appears fine.
|
||
### API | ||
|
||
- Developed with python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Developed with python | |
- Developed with Python |
2. Navigate to the project directory: | ||
```bash | ||
cd repository-name | ||
3. Install dependencies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Install dependencies: | |
3. Install dependencies: |
const defaultImage = "https://via.placeholder.com/100"; | ||
|
||
const handleClick = () => { | ||
//alert(`Produto: ${product.name} - Termo de pesquisa: ${searchTerm}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//alert(`Produto: ${product.name} - Termo de pesquisa: ${searchTerm}`); |
Can we remove the commented out alert since it's not used.
query: searchTerm, | ||
selectedCategories: selectedFacets.categories, | ||
selectedProductTypes: selectedFacets.productTypes, | ||
selectedbrands: selectedFacets.brands, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectedbrands: selectedFacets.brands, | |
selectedBrands: selectedFacets.brands, |
query: searchTerm, | ||
selectedCategories: selectedFacets.categories, | ||
selectedProductTypes: selectedFacets.productTypes, | ||
selectedbrands: selectedFacets.brands, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectedbrands: selectedFacets.brands, | |
selectedBrands: selectedFacets.brands, |
|
||
## Referências | ||
|
||
- [Documentação do Docker](https://docs.docker.com/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [Documentação do Docker](https://docs.docker.com/) | |
- [Docker Documentation](https://docs.docker.com/) |
## Referências | ||
|
||
- [Documentação do Docker](https://docs.docker.com/) | ||
- [Documentação do Docker Compose](https://docs.docker.com/compose/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [Documentação do Docker Compose](https://docs.docker.com/compose/) | |
- [Docker Compose Documentation](https://docs.docker.com/compose/) |
|
||
|
||
if __name__ == '__main__': | ||
# print(get_client_es().info()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# print(get_client_es().info()) |
|
||
vector = get_text_vector([term])[0] | ||
|
||
# Query híbrida com RRF (Reciprocal Rank Fusion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Query híbrida com RRF (Reciprocal Rank Fusion) | |
# Hybrid query with RRF (Reciprocal Rank Fusion) |
|
||
|
||
def build_hybrid_query(term=None, categories=None, product_types=None, brands=None, hybrid=False): | ||
# Query padrão |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Query padrão | |
# Standard query |
This PR contains the frontend and api projects built for the article How to use Hybrid search for an e-commerce product catalogue