lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Smith" <poeticve...@gmail.com>
Subject Re: Is this query possible?
Date Wed, 29 Jul 2009 20:03:17 GMT
Maybe you can perform the OR clause with the MultiSearcher and use a custom
made QueryFilter to filter the results that you don't need out of the first
index.

~Andrew

On Wed, Jul 29, 2009 at 3:22 PM, Andrei Alecu <andrei@tachyon-labs.com>wrote:

> Right, I was doing two separate searches before, but I was hoping there was
> a better way.
>
> Thanks.
>
>
> Digy wrote:
>
>> Either you have to reindex "Index A" and add a "visible" field with values
>> both 0 and 1, or make two seperate searches.
>>
>> DIGY
>>
>> -----Original Message-----
>> From: Andrei Alecu [mailto:andrei@tachyon-labs.com] Sent: Wednesday, July
>> 29, 2009 9:54 PM
>> To: lucene-net-dev@incubator.apache.org
>> Subject: Is this query possible?
>>
>> Hello all,
>>
>> I have a MultiSearcher searching two separate indexes.
>>
>> One of the indexes (index B) has some extra terms in its documents
>> compared to the other (index A).
>>
>> Consider this scenario:
>>
>> Index A documents:
>> field: fulltext
>>
>> Index B documents:
>> field: fulltext
>> field: visible
>>
>> I want for a query such as :
>>
>> fulltext:"car" AND visible:1
>>
>> To return all the matching "car" results in Index A, thus ignoring the
>> 'visibile' constraint if it's not defined for the document. How can I do
>> that? Right now the results completely skip Index A because of no matching
>> 'visible' field.
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message