You can put an actual OR in the fq (an fq, by default, is in the
solr-lucene query parser language). Might that achieve what you want?
&fq= -openingtime:[* TO *] OR openingtime:[* TO NOW]
&fq= -closingtime:[* TO *] OR closingtime:[NOW TO *]
Does that, or some variation of it, do what you need?
On 3/21/2011 5:43 PM, Jan-Eirik B. Nævdal wrote:
Hi
Have this problem I tried to solve with filter queries but I think I`m stuck
now, and don't see a solution how to solve my problem.
My problem is that i want a result page that shows those documents that
matches
these filter query fq=openingtime:[* TO NOW] , fq=closingtime[NOW TO *] for
the documents with limited time access
but i want also all documents that does not have the fields openingtime and
closingtime defined
like this filter query fq=-openingtime[* TO *] and fq = -closingtime[* TO *]
Are there some solution that allows me to make a "join" of these two filter
queries, that supports pagination.
A client side "manual" join would not be the best solution here because of
the system the results are displayed in.
Simple example:
Document 1 : openingtime = 1545 1. May.2050 closingtime 1453 1. June.2050
//available in the future
Document 2: Does not have the fields openingtime and closing time
Document 3 Does not have the fields openingtime and closing time
Document 4 openingtime = 1545 1. May.2010 closingtime 1453 1. June.2030 /
available now
My result page should then show document 2,3 and 4 but not document 1
Can anyone point me in the direction how to solve this
Technical information:
Solr 1.4.1 (is being ported from 1.3) (reasons for going to 3.x would be
appreciated
Default operator: AND
Several different documents where one type should only be displayed in the
results for a limited time. This information is indexed as dates in that
type of document.
Those fields does not exist on the other documents in the index.
Not any major changes in the schema.xml
A solr instance here can contain between 5K-10M documents
JanEirik