Skip to content
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

github.com/blevesearch/bleve/v2/http/search.go bug? #1873

Closed
hktalent opened this issue Aug 25, 2023 · 1 comment
Closed

github.com/blevesearch/bleve/v2/http/search.go bug? #1873

hktalent opened this issue Aug 25, 2023 · 1 comment
Assignees

Comments

@hktalent
Copy link

hktalent commented Aug 25, 2023

github.com/blevesearch/bleve/v2/http/search.go bug?
No ctx is passed in, when the network times out, or the client cancels the request, the query is not terminated gracefully

searchResponse, err := index.Search(&searchRequest)

change to :

	// execute the query
	searchResponse, err := index.SearchInContext(req.Context(),&searchRequest)
Likith101 added a commit to Likith101/bleve that referenced this issue Nov 14, 2023
Likith101 added a commit that referenced this issue Nov 16, 2023
- Added timeout value, which the user can pass through request
parameters
 - Create context with the timeout value if present
 - Change the call to SearchInContext
@Likith101
Copy link
Member

Added the option of giving the timeout as part of the request which will then be passed on to the search function. The case of client cancelling a request does not make much sense in a http handler function and so hasn't been added.

abhinavdangeti added a commit that referenced this issue Nov 17, 2023
|\
| * c8e3daf Likith B | #1873: Added timeout option in the Search Handler (#1898)
| * 6dee5e9 Aditi Ahuja | Added missing nil check (#1905)
| * 907c83e Rahul Rampure | Added a document that demonstrates the performance benefits of docvalues (#1897)
abhinavdangeti added a commit that referenced this issue Nov 17, 2023
|\
| * c8e3daf Likith B | #1873: Added timeout option in the Search Handler (#1898)
| * 6dee5e9 Aditi Ahuja | Added missing nil check (#1905)
| * 907c83e Rahul Rampure | Added a document that demonstrates the performance benefits of docvalues (#1897)
abhinavdangeti added a commit that referenced this issue Jan 2, 2024
|\
| * e26eace Mohd Shaad Khan | MB-60207 fix facets merge (#1946)
| * c8e3daf Likith B | #1873: Added timeout option in the Search Handler (#1898)
| * 6dee5e9 Aditi Ahuja | Added missing nil check (#1905)
| * 907c83e Rahul Rampure | Added a document that demonstrates the performance benefits of docvalues (#1897)
abhinavdangeti added a commit that referenced this issue Feb 13, 2024
```
* 5c7445c Abhinav Dangeti | Fix merge conflict
*   a0cb65a Abhinav Dangeti | Merge remote-tracking branch 'origin/master' into 7.6-couchbase
|\
| * 5f1f45a Sergio Vera | Fixed spanish accents normalization (#1957)
| * e26eace Mohd Shaad Khan | MB-60207 fix facets merge (#1946)
| * c8e3daf Likith B | #1873: Added timeout option in the Search Handler (#1898)
| * 6dee5e9 Aditi Ahuja | Added missing nil check (#1905)
| * 907c83e Rahul Rampure | Added a document that demonstrates the performance benefits of docvalues (#1897)
* | 8b9206a Abhi Dangeti | MB-60739: Upgrade go-faiss & zapx/v16 (#1985)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants