Skip to content

regex query help #1837

Answered by metonymic-smokey
kskarthik asked this question in Q&A
Jul 6, 2023 · 5 comments · 2 replies
Discussion options

You must be logged in to vote

@kskarthik thanks for reaching out.

I reproduced the panic locally with the same regex query. In this specific query, there is an error returned "zero width assertions not allowed" and hence, results was nil.
Adding error handling when dealing with returned errors in search() should fix this.

I added a log for the error:

result, err := index.Search(searchRequest)
fmt.Printf("error after query is %v \n", err)

This is the output after adding the log for the error:

aditiahuja@Aditis-MacBook-Pro go-ifsc % go run main.go search -m regex '^ICIC*'
error after query is zero width assertions not allowed 

Please let me know if you have any further questions, thanks!

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@kskarthik
Comment options

Answer selected by kskarthik
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@kskarthik
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants