Relative Content

Tag Archive for elasticsearch

Adjusting Field Boost Based on Indexed Scores in Elasticsearch

I’m working on an e-commerce site where products are indexed in Elasticsearch. Users search through fields like brand, publisher, product_name, and category. I typically give the highest boost to the name field when matching search queries. However, some product names are unique, and I want to adjust the boost based on a pre-determined score for each product’s name field that I store during indexing.

Search for multiple exact HTTP paths and methods

I’m trying to filter records based on multiple HTTP paths and methods, such as /api/v1/users with GET and /api/v1/product with POST for a specific CallerId. However, with the current query I’m using, I’m only retrieving records for one path.

Elasticsearch aggregation AND and OR

Im looking for some help with Aggregates in my query. Overall i got it running pretty for however it is excluding data and im maybe using the wrong approach here. In my dataset i have an key called “productwaarden” that is a nested object. Inside this i hold data like this:

Elasticsearch date in range date_histogram extended_bounds

I want to get date_histogram during specific period, how to restrict the date period? Should I use the extended_bounds parameter? For example : I want to query the date_histogram between ‘2024-07-10’ and ‘2024-07-22’, and the fixed_interval could be changed. I query with this expression insruing having the same filter range in the query: