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 Seid Mohammed <se...@gmail.com> on 2009/05/07 17:14:26 UTC
why setPhraseSlop() not helping
I have set the slop for my search to be some terms away for inclusion.
unfortunately, the result is the same indpendent of my setPhraseSlop(int) usage.
code excerpts:
==================================
QueryParser qp = new QueryParser("content", new AmharicAnalyzer());
qp.setPhraseSlop(3);
Query query = qp.parse("word1 word2");
===================================
It has no impact on the result at all
thanks a lot
seid M.
--
"RABI ZIDNI ILMA"
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: why setPhraseSlop() not helping
Posted by Seid Mohammed <se...@gmail.com>.
Thanks Erick
it solves
On Thu, May 7, 2009 at 8:13 PM, Erick Erickson <er...@gmail.com> wrote:
> You haven't forced the double quotes through to the parser. Try
> Query query = qp.parse("\"word1 word2\"");
>
> On Thu, May 7, 2009 at 11:14 AM, Seid Mohammed <se...@gmail.com> wrote:
>
>> I have set the slop for my search to be some terms away for inclusion.
>> unfortunately, the result is the same indpendent of my setPhraseSlop(int)
>> usage.
>> code excerpts:
>> ==================================
>> QueryParser qp = new QueryParser("content", new AmharicAnalyzer());
>> qp.setPhraseSlop(3);
>> Query query = qp.parse("word1 word2");
>> ===================================
>> It has no impact on the result at all
>>
>> thanks a lot
>> seid M.
>>
>> --
>> "RABI ZIDNI ILMA"
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>
--
"RABI ZIDNI ILMA"
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: why setPhraseSlop() not helping
Posted by Erick Erickson <er...@gmail.com>.
You haven't forced the double quotes through to the parser. Try
Query query = qp.parse("\"word1 word2\"");
On Thu, May 7, 2009 at 11:14 AM, Seid Mohammed <se...@gmail.com> wrote:
> I have set the slop for my search to be some terms away for inclusion.
> unfortunately, the result is the same indpendent of my setPhraseSlop(int)
> usage.
> code excerpts:
> ==================================
> QueryParser qp = new QueryParser("content", new AmharicAnalyzer());
> qp.setPhraseSlop(3);
> Query query = qp.parse("word1 word2");
> ===================================
> It has no impact on the result at all
>
> thanks a lot
> seid M.
>
> --
> "RABI ZIDNI ILMA"
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>