Gabriele
Lucene uses a combination of boolean and VSM for its IR.

A straight forward query for a keyword will only match docs with that keyword.

Now things quickly get subtle and complex the more sugar you add, more
complicated queries across fields and more complex
analysis chains but I think the short answer to your question is C
will not be returned, it will not be scored either

lee c

On 7 June 2011 08:30, Gabriele Kahlout <gabri...@mysimpatico.com> wrote:
> On Tue, Jun 7, 2011 at 8:43 AM, pravesh <suyalprav...@yahoo.com> wrote:
>
>> >k0 --> A | C
>> >k1 --> A | B
>> >k2 --> A | B | C
>> >k3 --> B | C
>> >Now let q=k1, how do I make sure C doesn't appear as a result since it
>> doesn't contain any occurence of k1?
>> Do we bother to do that. Now that's what lucene does :)
>>
>> Lucene/Solr doesn't do that, it ranks documents based on a scoring
> function, and with that it lacks the possibility of specifying that a
> particular term must appear (the closest way I know of is boosting it).
>
> The solution would be a way to tell Solr/lucene which documents/indices to
> query, i.e. query only the union/intersection of the documents in which
> k1,...kn appear, instead of query all indexed documents and apply the
> ranking function (which will give weight to documents that contains
> k1...kn).
>
>
>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/How-do-I-make-sure-the-resulting-documents-contain-the-query-terms-tp3031637p3033451.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Regards,
> K. Gabriele
>
> --- unchanged since 20/9/10 ---
> P.S. If the subject contains "[LON]" or the addressee acknowledges the
> receipt within 48 hours then I don't resend the email.
> subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
> < Now + 48h) ⇒ ¬resend(I, this).
>
> If an email is sent by a sender that is not a trusted contact or the email
> does not contain a valid code then the email is not received. A valid code
> starts with a hyphen and ends with "X".
> ∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
> L(-[a-z]+[0-9]X)).
>

Reply via email to