Closed shili167 closed 6 years ago
Hello @shili167, we recently added support for include
and exclude
fields on the result components. Check docs here.
You can use beforeSend
method on ReactiveBase
to transform the network request before execution. Refer docs here.
Hope that helps!
Thank you! I tried include and exclude in result, but the props didn't get inserted into the query (_source) that send to elastic search....maybe it is a new feature, I need to update the version of the library?
Do you have a quick sample for beforeSend function to retrieve the current query?
Make sure you're on the latest version of reactivesearch. You can do:
<ReactiveBase
...props
beforeSend={(request) => {
// you will have access to the query inside the request object's body
// update the request as you like
// and return the updated request
return updatedRequest;
}}
/>
Hi,
Is there a way to grab the query before it send to Elastic Search server, and change the query? I need to add an "include", "exclude", and change the "highlight" part of the query.
Thank you!