My C# Where calls translates to this lucene, which is what I want. That is, they are all AND'ed together.
{(Tenant:TEST) AND (Category:Cats) AND (SubCategory:Motorcycle) AND (OwningCatalogId:2)}
When I add in two Search terms I get this:
{(Tenant:TEST) ( ProfileId:(8081) ProfileName:(*8081*)) AND (Category:Cats) AND (SubCategory:Motorcycle) AND (OwningCatalogId:2)}
Note that the Tenant term appears OR’ed into the others. It should be AND’ed. Like so:
{(Tenant:TEST) AND ( ProfileId:(8081) ProfileName:(*8081*)) AND (Category:Cats) AND (SubCategory:Motorcycle) AND (OwningCatalogId:2)}
How do I order my search terms to achieve this?
I hope the answer isn't "move the Where(x => x.Tenant == "TEST") term after the Search(...) calls" because the query is constructed in a domain object that enforces a tenant restriction. The caller is free to append on further filtering, but I'd like to protect against forgetting that tenant term.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hibernating Rhinos Ltd
Oren Eini l CEO l Mobile: + 972-52-548-6969
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
Yes, I had experimented with those a bit but still couldn't get correct results. Specifically, getting the Search() terms to OR to each other, but ANDing that composite predicate in with all the others. I'll experiment a bit more today and come back with some examples.
--