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 "☼ 林永忠 ☼ (Yung-chung Lin)" <he...@gmail.com> on 2012/02/28 02:30:40 UTC

How to exclude words with overlapping patterns?

Hi all,

I have a question. Is there a way to distinguish queries like 'hotel' and
'hotel restaurant', queries with overlapping patterns, effectively?
For example, if I want the search to return 'hotel' in the top 100 results
while 'hotel restaurant' results come after those of 'hotel', when I search
for 'hotel'.
But it returns 'hotel restaurant' in the top results with 'hotel' results
coming after the top results, when I search for 'hotel restaurant'.

Thank you very much.

Yung-chung Lin

Re: How to exclude words with overlapping patterns?

Posted by Ian Lea <ia...@gmail.com>.
Sounds a bit like the thread starting with
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg08849.html.

Should be possible with some combination of boosts and should/must/not logic.


--
Ian.


On Tue, Feb 28, 2012 at 1:30 AM, ☼ 林永忠 ☼ (Yung-chung Lin)
<he...@gmail.com> wrote:
> Hi all,
>
> I have a question. Is there a way to distinguish queries like 'hotel' and
> 'hotel restaurant', queries with overlapping patterns, effectively?
> For example, if I want the search to return 'hotel' in the top 100 results
> while 'hotel restaurant' results come after those of 'hotel', when I search
> for 'hotel'.
> But it returns 'hotel restaurant' in the top results with 'hotel' results
> coming after the top results, when I search for 'hotel restaurant'.
>
> Thank you very much.
>
> Yung-chung Lin

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