Hello @benrolfe can you give more information ? and we will get you some help
Are you using N1QL query or FTS ?
What version of SDK are you using against which Server Version ?
Also if I understand it right you are trying to find the word (in this example cow) anywhere in the string not just if it starts with?
Hi @benrolfe, what is the rest of your search query? I’ve just created a bit of a test to repro this using a document of
{
"animals": "dog, cow, cat"
}
Using gocb.NewSearchQuery("test", cbft.NewConjunctionQuery(cbft.NewRegexpQuery(".*cow.*").Field("animals"))) seems to match my document. It also matches if I change to “cow, dog, cat”.
@benrolfe The definition looks fine to me.
Can you try this curl request directly to your server (replacing the <> with the necessary parameters) and let us know if you see results?
Below is the response. The issue looks to be “TooManyClauses”.
{"status":{"total":6,"failed":6,"successful":0,"errors":{"PropertyAPISearch_221a92802b4a7473_13aa53f3":"TooManyClauses[2144 \u003e maxClauseCount, which is set to 1024]","PropertyAPISearch_221a92802b4a7473_18572d87":"TooManyClauses[2167 \u003e maxClauseCount, which is set to 1024]","PropertyAPISearch_221a92802b4a7473_54820232":"TooManyClauses[2178 \u003e maxClauseCount, which is set to 1024]","PropertyAPISearch_221a92802b4a7473_6ddbfb54":"TooManyClauses[2162 \u003e maxClauseCount, which is set to 1024]","PropertyAPISearch_221a92802b4a7473_aa574717":"TooManyClauses[2233 \u003e maxClauseCount, which is set to 1024]","PropertyAPISearch_221a92802b4a7473_f4e0a48a":"TooManyClauses[2134 \u003e maxClauseCount, which is set to 1024]"}},"request":{"query":{"regexp":".*OW1.*","field":"PortalOptions"},"size":10,"from":0,"highlight":null,"fields":null,"facets":null,"explain":false,"sort":["-_score"],"includeLocations":false,"search_after":null,"search_before":null},"hits":null,"total_hits":0,"max_score":0,"took":19711861,"facets":null}
I can’t really make my search any more specific, as that’s the data I need.
Sorry, my mistake. I meant to write that this PUT cURL command increases the MaxClauseCount, which solved my problem. I think I used the wrong method in my previous message.
curl -X PUT -H "Content-type:application/json" http://<username>:<password>@<ip>:8094/api/managerOptions -d '{"bleveMaxClauseCount": "10000"}'