Domanda

I want to create a filter query with Solarium, using a lot of ORs. The sql equivalent would be

select * from myTable where myValue in (1,3,5,6,9);  

The string that I have created for my filter query is this:

spr:1 OR spr:3 OR spr:5 OR spr:6 OR spr:9  

When I execute the query, this error is thrown:

Exception: Solr HTTP error: OK (400) {"error":{"msg":"undefined field text","code":400}}   

There is no doubt that the field exists in my schema and that it contains the correct values. Using solr admin, I can manually execute the filter query and get the expected results.

Can someone point me in the right direction please? Naturally I'd be happy to post more info, if needed.

È stato utile?

Soluzione

It might be an old question, but a solution is doing it like this:

spr:(1 OR 3 OR 5 OR 6...)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top