You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Valentin Popov <va...@gmail.com> on 2016/10/12 16:59:45 UTC

complex disjoint search query

Hi all, 

I broke my mind to figure out one search problem. I have a field «To» that store domains. Like example To:local.one, other.one, third.one. I have a set of a domain’s that are local, in this example it is «local.one», and set of non local domains are infinitive. I need to search all documents that contains non local one domains. 

Here are 3 documents:
1. To:local.one, other.one, third.one,
2. To:other.one, third.one,
3. To:local.one.

So for my query I expect 1, 2 documents because 1 contains not only local domains and 2 all non local domains. I can setup set of non local domains, because it is infinitive. Is it possible some how make a query to achieve such expectations? 

Regards,
Valentin





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: complex disjoint search query

Posted by Valentin Popov <va...@gmail.com>.
Thanks, will follow this way. 


> On 13 Oct 2016, at 06:02, Trejkaz <tr...@trypticon.org> wrote:
> 
> On Thu, Oct 13, 2016 at 5:04 AM, Mikhail Khludnev <mk...@apache.org> wrote:
>> Hello,
>> Why not "To:local.one -(To:[* TO local.one} To:{local.one TO *)" ?
> 
> That would not match example 2:
> 
>> 2. To:other.one, third.one,
> 
> This alone would match 1 and 2, but not 3:
> 
>    To:[* TO local.one} OR To:{local.one TO *)
> 
> Except the performance would be rubbish if you had a large enough
> number of domains.
> 
> TX
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 

Regards,
Valentin Popov





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: complex disjoint search query

Posted by Trejkaz <tr...@trypticon.org>.
On Thu, Oct 13, 2016 at 5:04 AM, Mikhail Khludnev <mk...@apache.org> wrote:
> Hello,
> Why not "To:local.one -(To:[* TO local.one} To:{local.one TO *)" ?

That would not match example 2:

> 2. To:other.one, third.one,

This alone would match 1 and 2, but not 3:

    To:[* TO local.one} OR To:{local.one TO *)

Except the performance would be rubbish if you had a large enough
number of domains.

TX

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: complex disjoint search query

Posted by Mikhail Khludnev <mk...@apache.org>.
Hello,
Why not "To:local.one -(To:[* TO local.one} To:{local.one TO *)" ?

On Wed, Oct 12, 2016 at 7:59 PM, Valentin Popov <va...@gmail.com>
wrote:

> Hi all,
>
> I broke my mind to figure out one search problem. I have a field «To» that
> store domains. Like example To:local.one, other.one, third.one. I have a
> set of a domain’s that are local, in this example it is «local.one», and
> set of non local domains are infinitive. I need to search all documents
> that contains non local one domains.
>
> Here are 3 documents:
> 1. To:local.one, other.one, third.one,
> 2. To:other.one, third.one,
> 3. To:local.one.
>
> So for my query I expect 1, 2 documents because 1 contains not only local
> domains and 2 all non local domains. I can setup set of non local domains,
> because it is infinitive. Is it possible some how make a query to achieve
> such expectations?
>
> Regards,
> Valentin
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Sincerely yours
Mikhail Khludnev