Hi Everybody,

Let me give you a brief idea of our Solr document. We have about 6 text type 
fields, each containing IPTC data extracted from photos. Search is performed 
mostly on these 6 fields.
We also have a mutlivalue field named group_id that contains a list of all the  
group_ids that have access to this photo.  In other words we are storing the 
metadata of the photo as well as the permissions applicable for this photo in 
the Solr document itself. This group_id field by the way is of long type.

Additionally we have certain boolean and constant type fields named 
visibleToEndUser (boolean) and entityType (a java enum between 0 to 5).

The first field defaultSearch is a copyField which contains a copy of all the 
values of 6 text type fields that I have mentioned.

The way we query presently using the default search handler is like this.

defaultSearch:(Dog) AND (group_id:2181347 OR group_id:2181364 OR 
group_id:2216624 OR group_id:2216990) AND (entityType:0) AND 
(visibleToEndUser:true)

We want to start using the dismax (if not dismax then edismax)  query handler 
but so far I have not been able to replicate the query mentioned above to the 
equivalent dismax form.

What I cannot figure out is?

1. How do I apply exact match on the group_id, visibleToEndUser and the 
entityType fields? Or How how do I query a specific field with a specific value 
rather than searching across all fields with all values.
2. How do I apply OR and AND conditions?


Swapnonil Mukherjee



Reply via email to