solr-vector-scoring icon indicating copy to clipboard operation
solr-vector-scoring copied to clipboard

How to handle queries containing large vector embed.

Open tewatiarahul opened this issue 4 years ago • 1 comments

Hi,

In the given example you took embedding of size 5.. in case of solr 8.5, vector embed of length 512 or greater when we send request for querying. it gives error 414.. url too large... how this issue can be resolved any idea about it? error

Thanks

tewatiarahul avatar Nov 03 '20 10:11 tewatiarahul

Syntax in CURL:

CURL http://localhost:8983/solr/{your colletction}/query?fl=name,score -d 'q={!vp f=vector vector="comma_separated_string_of_embedding_of_any_length"}'

CURL equivalent code in python:

url="http://localhost:8983/solr/{your_collection}/query?fl=name,score"

data={"query":"q={!vp f=vector vector=\"comma_separated_string_of_embedding_of_any_length\"}"}

response = requests.post(url=url,data=json.dumps(data),headers={'Content-Type': 'application/json'})

print(response.text)

satishsilveri avatar Nov 04 '20 16:11 satishsilveri