You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by kartik vishwanath <ka...@gmail.com> on 2013/06/11 23:42:09 UTC

Filtering of results based on associated field values

I have some unusual requirements for a Solr 4.3 based search service I am
developing:
* I am required to filter the results by a set of fields, some of which are
multivalued
* Each 'filter' field value has an associated begin and end date/time
field, in the case of the multivalued fields, different values can have
different begin/end date times
* If the current time is outside of the associated begin/end date time,
that particular value should not be considered in the filtering

I am really not sure if/how to do something like this. Can anyone suggest
an approach that I could take?

Please let me know if the question is unclear. I am having a hard time on
how to phrase this properly.

Thanks in advance,
Kartik

Re: Filtering of results based on associated field values

Posted by Jack Krupansky <ja...@basetechnology.com>.
Give us an example of one of your multivalued fields.

The semantics of a query or filter query on a multivalued field are simply 
does ANY of the multiple values pass the query/filter conditions. If so, if 
ANY matched, the document is a match. If none of the values in the multiple 
values passes the query/filter, then the document does not match.

Your filter could be a range query, with a start and end date. A document 
would be accepted by the filter if any of the values in the multivalued 
field fall within the filter range.

-- Jack Krupansky

-----Original Message----- 
From: kartik vishwanath
Sent: Tuesday, June 11, 2013 5:42 PM
To: solr-user@lucene.apache.org
Subject: Filtering of results based on associated field values

I have some unusual requirements for a Solr 4.3 based search service I am
developing:
* I am required to filter the results by a set of fields, some of which are
multivalued
* Each 'filter' field value has an associated begin and end date/time
field, in the case of the multivalued fields, different values can have
different begin/end date times
* If the current time is outside of the associated begin/end date time,
that particular value should not be considered in the filtering

I am really not sure if/how to do something like this. Can anyone suggest
an approach that I could take?

Please let me know if the question is unclear. I am having a hard time on
how to phrase this properly.

Thanks in advance,
Kartik